]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Don't add anycast reference to device multiple times
authorMichal Wrobel <xmxwx@asn.pl>
Tue, 27 Feb 2007 19:12:45 +0000 (11:12 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Mar 2007 18:50:27 +0000 (10:50 -0800)
[IPV6]: anycast refcnt fix

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: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv6/addrconf.c

index e3854696988d76ec4bd16b2e4b6e35067de28d02..58cb669a27cabcb4c93ed8d5d3a337eaa7682aad 100644 (file)
@@ -469,6 +469,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