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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080720.181702.239050112.davem@davemloft.net>
Date:	Sun, 20 Jul 2008 18:17:02 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	torvalds@...ux-foundation.org
Cc:	akpm@...ux-foundation.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, yoshfuji@...ux-ipv6.org
Subject: Re: [GIT]: Networking

From: Linus Torvalds <torvalds@...ux-foundation.org>
Date: Sun, 20 Jul 2008 18:07:28 -0700 (PDT)

> This warning also seems to be new:
> 
> 	net/ipv6/addrconf.c: In function ‘addrconf_add_linklocal’:
> 	net/ipv6/addrconf.c:2318: warning: unused variable ‘net’
> 
> and looking at the code it's apparently because I'm not an optimistic 
> enough dad.
> 
> But hey, if you had three pre-teenage girls, you might not be all that 
> optimistic either. So I think that's reasonable.
> 
> Problem seems to have been introduced by 53b7997f ("ipv6 netns: Make 
> several "global" sysctl variables namespace aware")

Let's just expand the thing in the one spot it gets
referenced in.

Please apply, thanks.

ipv6: Fix warning in addrconf code.

Reported by Linus.

Signed-off-by: David S. Miller <davem@...emloft.net>

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 580ae50..9f4fcce 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2315,12 +2315,11 @@ static void init_loopback(struct net_device *dev)
 static void addrconf_add_linklocal(struct inet6_dev *idev, struct in6_addr *addr)
 {
 	struct inet6_ifaddr * ifp;
-	struct net *net = dev_net(idev->dev);
 	u32 addr_flags = IFA_F_PERMANENT;
 
 #ifdef CONFIG_IPV6_OPTIMISTIC_DAD
 	if (idev->cnf.optimistic_dad &&
-	    !net->ipv6.devconf_all->forwarding)
+	    !dev_net(idev->dev)->ipv6.devconf_all->forwarding)
 		addr_flags |= IFA_F_OPTIMISTIC;
 #endif
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ