浏览代码

ipv6: Fix warning in addrconf code.

Reported by Linus.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Miller 17 年之前
父节点
当前提交
702beb87d6
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      net/ipv6/addrconf.c

+ 1 - 2
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)
 static void addrconf_add_linklocal(struct inet6_dev *idev, struct in6_addr *addr)
 {
 {
 	struct inet6_ifaddr * ifp;
 	struct inet6_ifaddr * ifp;
-	struct net *net = dev_net(idev->dev);
 	u32 addr_flags = IFA_F_PERMANENT;
 	u32 addr_flags = IFA_F_PERMANENT;
 
 
 #ifdef CONFIG_IPV6_OPTIMISTIC_DAD
 #ifdef CONFIG_IPV6_OPTIMISTIC_DAD
 	if (idev->cnf.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;
 		addr_flags |= IFA_F_OPTIMISTIC;
 #endif
 #endif