diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2016-01-08 07:47:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-10 22:54:27 -0500 |
commit | 3d171f3907329d4b1ce31d5ec9c852c5f0269578 (patch) | |
tree | 51e486c1872310340fc109c6c9423b554e3bd2a5 /net/ipv6 | |
parent | 541b8e291f29e480fb9c6400ce796c2eaefe9229 (diff) |
ipv6: always add flag an address that failed DAD with DADFAILED
The userspace needs to know why is the address being removed so that it can
perhaps obtain a new address.
Without the DADFAILED flag it's impossible to distinguish removal of a
temporary and tentative address due to DAD failure from other reasons (device
removed, manual address removal).
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/addrconf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 8697551b16a8..38eeddedfc21 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -1772,12 +1772,13 @@ struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net, const struct in6_addr *add | |||
1772 | 1772 | ||
1773 | static void addrconf_dad_stop(struct inet6_ifaddr *ifp, int dad_failed) | 1773 | static void addrconf_dad_stop(struct inet6_ifaddr *ifp, int dad_failed) |
1774 | { | 1774 | { |
1775 | if (dad_failed) | ||
1776 | ifp->flags |= IFA_F_DADFAILED; | ||
1777 | |||
1775 | if (ifp->flags&IFA_F_PERMANENT) { | 1778 | if (ifp->flags&IFA_F_PERMANENT) { |
1776 | spin_lock_bh(&ifp->lock); | 1779 | spin_lock_bh(&ifp->lock); |
1777 | addrconf_del_dad_work(ifp); | 1780 | addrconf_del_dad_work(ifp); |
1778 | ifp->flags |= IFA_F_TENTATIVE; | 1781 | ifp->flags |= IFA_F_TENTATIVE; |
1779 | if (dad_failed) | ||
1780 | ifp->flags |= IFA_F_DADFAILED; | ||
1781 | spin_unlock_bh(&ifp->lock); | 1782 | spin_unlock_bh(&ifp->lock); |
1782 | if (dad_failed) | 1783 | if (dad_failed) |
1783 | ipv6_ifa_notify(0, ifp); | 1784 | ipv6_ifa_notify(0, ifp); |