lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190225041243.9753-1-liuhangbin@gmail.com>
Date:   Mon, 25 Feb 2019 12:12:43 +0800
From:   Hangbin Liu <liuhangbin@...il.com>
To:     netdev@...r.kernel.org
Cc:     Stefano Brivio <sbrivio@...hat.com>,
        "David S . Miller" <davem@...emloft.net>,
        David Ahern <dsa@...ulusnetworks.com>,
        Hangbin Liu <liuhangbin@...il.com>
Subject: [PATCH net] sit: use ipv6_mod_enabled to check if ipv6 is disabled

ipv6_mod_enabled() is more safe and gentle to check if ipv6 is disabled
at running time.

Fixes: 173656accaf5 ("sit: check if IPv6 enabled before calling ip6_err_gen_icmpv6_unreach()")
Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
---
 net/ipv6/sit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index e8a1dabef803..eea1f19985a7 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -546,7 +546,7 @@ static int ipip6_err(struct sk_buff *skb, u32 info)
 	}
 
 	err = 0;
-	if (__in6_dev_get(skb->dev) &&
+	if (ipv6_mod_enabled() &&
 	    !ip6_err_gen_icmpv6_unreach(skb, iph->ihl * 4, type, data_len))
 		goto out;
 
-- 
2.19.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ