]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[IPV6]: anycast refcnt fix
authorMichal Wrobel <xmxwx@asn.pl>
Thu, 8 Mar 2007 07:38:52 +0000 (08:38 +0100)
committerAdrian Bunk <bunk@stusta.de>
Thu, 8 Mar 2007 07:38:52 +0000 (08:38 +0100)
This patch fixes a bug in Linux IPv6 stack which caused anycast address
to be added to a device prior DAD has been completed. This led to
incorrect reference count which resulted in infinite wait for
unregister_netdevice completion on interface removal.

Signed-off-by: Michal Wrobel <xmxwx@asn.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
net/ipv6/addrconf.c

index e8f144171880dca03e0146ad509ab4b352dbab7a..e9e9894d2cab71ea62077da2ad3d92dcbfa4e664 100644 (file)
@@ -449,6 +449,8 @@ static void dev_forward_change(struct inet6_dev *idev)
                        ipv6_dev_mc_dec(dev, &addr);
        }
        for (ifa=idev->addr_list; ifa; ifa=ifa->if_next) {
+               if (ifa->flags&IFA_F_TENTATIVE)
+                       continue;
                if (idev->cnf.forwarding)
                        addrconf_join_anycast(ifa);
                else