summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ndisc.c
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2018-01-25 20:16:29 -0800
committerDavid S. Miller <davem@davemloft.net>2018-01-29 14:18:38 -0500
commitc76fe2d98c726224a975a0d0198c3fb50406d325 (patch)
tree2c2c9d6f8a7174c3ef271d910123c99bf1377085 /net/ipv6/ndisc.c
parent202a0a70e445caee1d0ec7aae814e64b1189fa4d (diff)
downloadop-kernel-dev-c76fe2d98c726224a975a0d0198c3fb50406d325.zip
op-kernel-dev-c76fe2d98c726224a975a0d0198c3fb50406d325.tar.gz
net: ipv6: send unsolicited NA after DAD
Unsolicited IPv6 neighbor advertisements should be sent after DAD completes. Update ndisc_send_unsol_na to skip tentative, non-optimistic addresses and have those sent by addrconf_dad_completed after DAD. Fixes: 4a6e3c5def13c ("net: ipv6: send unsolicited NA on admin up") Reported-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r--net/ipv6/ndisc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index b3cea20..f61a5b6 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -566,6 +566,11 @@ static void ndisc_send_unsol_na(struct net_device *dev)
read_lock_bh(&idev->lock);
list_for_each_entry(ifa, &idev->addr_list, if_list) {
+ /* skip tentative addresses until dad completes */
+ if (ifa->flags & IFA_F_TENTATIVE &&
+ !(ifa->flags & IFA_F_OPTIMISTIC))
+ continue;
+
ndisc_send_na(dev, &in6addr_linklocal_allnodes, &ifa->addr,
/*router=*/ !!idev->cnf.forwarding,
/*solicited=*/ false, /*override=*/ true,
OpenPOWER on IntegriCloud