Commit 27bdb2ab authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller

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: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 93fa159a
...@@ -2704,10 +2704,10 @@ static int addrconf_ifdown(struct net_device *dev, int how) ...@@ -2704,10 +2704,10 @@ static int addrconf_ifdown(struct net_device *dev, int how)
/* Flag it for later restoration when link comes up */ /* Flag it for later restoration when link comes up */
ifa->flags |= IFA_F_TENTATIVE; ifa->flags |= IFA_F_TENTATIVE;
in6_ifa_hold(ifa); in6_ifa_hold(ifa);
write_unlock_bh(&idev->lock);
} else { } else {
list_del(&ifa->if_list); list_del(&ifa->if_list);
ifa->dead = 1; ifa->dead = 1;
}
write_unlock_bh(&idev->lock); write_unlock_bh(&idev->lock);
/* clear hash table */ /* clear hash table */
...@@ -2715,6 +2715,7 @@ static int addrconf_ifdown(struct net_device *dev, int how) ...@@ -2715,6 +2715,7 @@ static int addrconf_ifdown(struct net_device *dev, int how)
hlist_del_init_rcu(&ifa->addr_lst); hlist_del_init_rcu(&ifa->addr_lst);
__in6_ifa_put(ifa); __in6_ifa_put(ifa);
spin_unlock_bh(&addrconf_hash_lock); spin_unlock_bh(&addrconf_hash_lock);
}
__ipv6_ifa_notify(RTM_DELADDR, ifa); __ipv6_ifa_notify(RTM_DELADDR, ifa);
atomic_notifier_call_chain(&inet6addr_chain, NETDEV_DOWN, ifa); atomic_notifier_call_chain(&inet6addr_chain, NETDEV_DOWN, ifa);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment