diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-04-12 05:41:32 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-13 02:29:27 -0700 |
commit | 27bdb2abcc5edb3526e25407b74bf17d1872c329 (patch) | |
tree | a25199ed5e17400b068980b179491f169292f4fe /net | |
parent | 93fa159abe50d3c55c7f83622d3f5c09b6e06f4b (diff) | |
download | kernel_samsung_tuna-27bdb2abcc5edb3526e25407b74bf17d1872c329.zip kernel_samsung_tuna-27bdb2abcc5edb3526e25407b74bf17d1872c329.tar.gz kernel_samsung_tuna-27bdb2abcc5edb3526e25407b74bf17d1872c329.tar.bz2 |
IPv6: keep tentative addresses in hash table
When link goes down, want address to be preserved but in a tentative
state, therefore it has to stay in hash list.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/addrconf.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index a9913d2..9d78c12 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2704,17 +2704,18 @@ static int addrconf_ifdown(struct net_device *dev, int how) /* Flag it for later restoration when link comes up */ ifa->flags |= IFA_F_TENTATIVE; in6_ifa_hold(ifa); + write_unlock_bh(&idev->lock); } else { list_del(&ifa->if_list); ifa->dead = 1; - } - write_unlock_bh(&idev->lock); + write_unlock_bh(&idev->lock); - /* clear hash table */ - spin_lock_bh(&addrconf_hash_lock); - hlist_del_init_rcu(&ifa->addr_lst); - __in6_ifa_put(ifa); - spin_unlock_bh(&addrconf_hash_lock); + /* clear hash table */ + spin_lock_bh(&addrconf_hash_lock); + hlist_del_init_rcu(&ifa->addr_lst); + __in6_ifa_put(ifa); + spin_unlock_bh(&addrconf_hash_lock); + } __ipv6_ifa_notify(RTM_DELADDR, ifa); atomic_notifier_call_chain(&inet6addr_chain, NETDEV_DOWN, ifa); |