]>
Commit | Line | Data |
---|---|---|
1bbce966 GKH |
1 | From stable-bounces@linux.kernel.org Tue Feb 27 11:14:04 2007 |
2 | From: Michal Wrobel <xmxwx@asn.pl> | |
3 | Date: Tue, 27 Feb 2007 11:12:45 -0800 (PST) | |
4 | Subject: Don't add anycast reference to device multiple times | |
5 | To: stable@kernel.org | |
6 | Cc: bunk@stusta.de | |
7 | Message-ID: <20070227.111245.26276999.davem@davemloft.net> | |
8 | ||
9 | From: Michal Wrobel <xmxwx@asn.pl> | |
10 | ||
11 | [IPV6]: anycast refcnt fix | |
12 | ||
13 | This patch fixes a bug in Linux IPv6 stack which caused anycast address | |
14 | to be added to a device prior DAD has been completed. This led to | |
15 | incorrect reference count which resulted in infinite wait for | |
16 | unregister_netdevice completion on interface removal. | |
17 | ||
18 | Signed-off-by: Michal Wrobel <xmxwx@asn.pl> | |
19 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
21 | ||
22 | --- | |
23 | net/ipv6/addrconf.c | 2 ++ | |
24 | 1 file changed, 2 insertions(+) | |
25 | ||
26 | --- linux-2.6.20.1.orig/net/ipv6/addrconf.c | |
27 | +++ linux-2.6.20.1/net/ipv6/addrconf.c | |
28 | @@ -469,6 +469,8 @@ static void dev_forward_change(struct in | |
29 | ipv6_dev_mc_dec(dev, &addr); | |
30 | } | |
31 | for (ifa=idev->addr_list; ifa; ifa=ifa->if_next) { | |
32 | + if (ifa->flags&IFA_F_TENTATIVE) | |
33 | + continue; | |
34 | if (idev->cnf.forwarding) | |
35 | addrconf_join_anycast(ifa); | |
36 | else |