]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.20.2/don-t-add-anycast-reference-to-device-multiple-times.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.20.2 / don-t-add-anycast-reference-to-device-multiple-times.patch
CommitLineData
1bbce966
GKH
1From stable-bounces@linux.kernel.org Tue Feb 27 11:14:04 2007
2From: Michal Wrobel <xmxwx@asn.pl>
3Date: Tue, 27 Feb 2007 11:12:45 -0800 (PST)
4Subject: Don't add anycast reference to device multiple times
5To: stable@kernel.org
6Cc: bunk@stusta.de
7Message-ID: <20070227.111245.26276999.davem@davemloft.net>
8
9From: Michal Wrobel <xmxwx@asn.pl>
10
11[IPV6]: anycast refcnt fix
12
13This patch fixes a bug in Linux IPv6 stack which caused anycast address
14to be added to a device prior DAD has been completed. This led to
15incorrect reference count which resulted in infinite wait for
16unregister_netdevice completion on interface removal.
17
18Signed-off-by: Michal Wrobel <xmxwx@asn.pl>
19Signed-off-by: David S. Miller <davem@davemloft.net>
20Signed-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