summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2016-06-02 17:17:15 +0000
committermarkj <markj@FreeBSD.org>2016-06-02 17:17:15 +0000
commit71ff51c02767153316df5b035b7a48ff6e006b3a (patch)
tree4d9539a8549d01ae27f8c8ec197b54e536e09cba
parent0c382ea64711225933310ae06a18b9743d9e55c2 (diff)
downloadFreeBSD-src-71ff51c02767153316df5b035b7a48ff6e006b3a.zip
FreeBSD-src-71ff51c02767153316df5b035b7a48ff6e006b3a.tar.gz
Always start IPv6 DAD asynchronously.
Otherwise we transmit the first neighbour solicitation in the context of the caller of nd6_dad_start(), which can easily result in lock recursion. When DAD is to be started after some delay, we send the first NS from the DAD callout handler, so just change the implementation to do this in the non-delayed case as well. Reviewed by: ae, hrs MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D6639
-rw-r--r--sys/netinet6/nd6_nbr.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index d621b52..2ac1d7a 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -1216,7 +1216,6 @@ nd6_dad_start(struct ifaddr *ifa, int delay)
struct in6_ifaddr *ia = (struct in6_ifaddr *)ifa;
struct dadq *dp;
char ip6buf[INET6_ADDRSTRLEN];
- int send_ns;
/*
* If we don't need DAD, don't do it.
@@ -1290,12 +1289,7 @@ nd6_dad_start(struct ifaddr *ifa, int delay)
dp->dad_ns_lcount = dp->dad_loopbackprobe = 0;
refcount_init(&dp->dad_refcnt, 1);
nd6_dad_add(dp);
- send_ns = 0;
- if (delay == 0) {
- send_ns = 1;
- delay = (long)ND_IFINFO(ifa->ifa_ifp)->retrans * hz / 1000;
- }
- nd6_dad_starttimer(dp, delay, send_ns);
+ nd6_dad_starttimer(dp, delay, 0);
}
/*
OpenPOWER on IntegriCloud