Skip to content

Commit f784ad3

Browse files
Mahesh Bandewardavem330
authored andcommitted
ipv6: do not send RTM_DELADDR for tentative addresses
RTM_NEWADDR notification is sent when IFA_F_TENTATIVE is cleared from the address. So if the address is added and deleted before DAD probes completes, the RTM_DELADDR will be sent for which there was no RTM_NEWADDR causing asymmetry in notification. However if the same logic is used while sending RTM_DELADDR notification, this asymmetry can be avoided. Signed-off-by: Mahesh Bandewar <maheshb@google.com> CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> CC: Patrick McHardy <kaber@trash.net> CC: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 90028b0 commit f784ad3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

net/ipv6/addrconf.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4888,6 +4888,13 @@ static void inet6_ifa_notify(int event, struct inet6_ifaddr *ifa)
48884888
struct net *net = dev_net(ifa->idev->dev);
48894889
int err = -ENOBUFS;
48904890

4891+
/* Don't send DELADDR notification for TENTATIVE address,
4892+
* since NEWADDR notification is sent only after removing
4893+
* TENTATIVE flag.
4894+
*/
4895+
if (ifa->flags & IFA_F_TENTATIVE && event == RTM_DELADDR)
4896+
return;
4897+
48914898
skb = nlmsg_new(inet6_ifaddr_msgsize(), GFP_ATOMIC);
48924899
if (!skb)
48934900
goto errout;

0 commit comments

Comments
 (0)