summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMahesh Bandewar <maheshb@google.com>2017-01-04 15:01:01 -0800
committerDavid S. Miller <davem@davemloft.net>2017-01-06 15:39:31 -0500
commitf784ad3d79e5be062b19dc36c53413daffeecc5c (patch)
treecc84803c7afa37b3620cfccf7fe9b5593751f0ab /net
parent90028b07a74ddcbaac1c5aee038a7108ae279b2e (diff)
downloadblackbird-op-linux-f784ad3d79e5be062b19dc36c53413daffeecc5c.tar.gz
blackbird-op-linux-f784ad3d79e5be062b19dc36c53413daffeecc5c.zip
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>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/addrconf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index c1e124bc8e1e..ac9bd5620f81 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4888,6 +4888,13 @@ static void inet6_ifa_notify(int event, struct inet6_ifaddr *ifa)
struct net *net = dev_net(ifa->idev->dev);
int err = -ENOBUFS;
+ /* Don't send DELADDR notification for TENTATIVE address,
+ * since NEWADDR notification is sent only after removing
+ * TENTATIVE flag.
+ */
+ if (ifa->flags & IFA_F_TENTATIVE && event == RTM_DELADDR)
+ return;
+
skb = nlmsg_new(inet6_ifaddr_msgsize(), GFP_ATOMIC);
if (!skb)
goto errout;
OpenPOWER on IntegriCloud