From: David Miller Date: Mon, 21 Jul 2008 01:17:02 +0000 (-0700) Subject: ipv6: Fix warning in addrconf code. X-Git-Tag: v2.6.27-rc1~963 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=702beb87d6b4e08cca394b210679e5d7c2ac9383;p=linux-2.6 ipv6: Fix warning in addrconf code. Reported by Linus. Signed-off-by: David S. Miller Signed-off-by: Linus Torvalds --- diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 580ae506c3..9f4fcce637 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