svn commit: r301213 - head/sys/netinet6
Mark Johnston
markj at FreeBSD.org
Thu Jun 2 17:17:17 UTC 2016
Author: markj
Date: Thu Jun 2 17:17:15 2016
New Revision: 301213
URL: https://svnweb.freebsd.org/changeset/base/301213
Log:
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
Modified:
head/sys/netinet6/nd6_nbr.c
Modified: head/sys/netinet6/nd6_nbr.c
==============================================================================
--- head/sys/netinet6/nd6_nbr.c Thu Jun 2 17:11:24 2016 (r301212)
+++ head/sys/netinet6/nd6_nbr.c Thu Jun 2 17:17:15 2016 (r301213)
@@ -1216,7 +1216,6 @@ nd6_dad_start(struct ifaddr *ifa, int de
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 de
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);
}
/*
More information about the svn-src-all
mailing list