Skip to content

Commit 6819a14

Browse files
Mike Manningdavem330
authored andcommitted
net: ipv6: fix regression of no RTM_DELADDR sent after DAD failure
Commit f784ad3 ("ipv6: do not send RTM_DELADDR for tentative addresses") incorrectly assumes that no RTM_NEWADDR are sent for addresses in tentative state, as this does happen for the standard IPv6 use-case of DAD failure, see the call to ipv6_ifa_notify() in addconf_dad_stop(). So as a result of this change, no RTM_DELADDR is sent after DAD failure for a link-local when strict DAD (accept_dad=2) is configured, or on the next admin down in other cases. The absence of this notification breaks backwards compatibility and causes problems after DAD failure if this notification was being relied on. The solution is to allow RTM_DELADDR to still be sent after DAD failure. Fixes: f784ad3 ("ipv6: do not send RTM_DELADDR for tentative addresses") Signed-off-by: Mike Manning <mmanning@brocade.com> Cc: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 7c30013 commit 6819a14

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

net/ipv6/addrconf.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4940,9 +4940,10 @@ static void inet6_ifa_notify(int event, struct inet6_ifaddr *ifa)
49404940

49414941
/* Don't send DELADDR notification for TENTATIVE address,
49424942
* since NEWADDR notification is sent only after removing
4943-
* TENTATIVE flag.
4943+
* TENTATIVE flag, if DAD has not failed.
49444944
*/
4945-
if (ifa->flags & IFA_F_TENTATIVE && event == RTM_DELADDR)
4945+
if (ifa->flags & IFA_F_TENTATIVE && !(ifa->flags & IFA_F_DADFAILED) &&
4946+
event == RTM_DELADDR)
49464947
return;
49474948

49484949
skb = nlmsg_new(inet6_ifaddr_msgsize(), GFP_ATOMIC);

0 commit comments

Comments
 (0)