Date: Thu, 2 Jun 2016 17:17:15 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301213 - head/sys/netinet6 Message-ID: <201606021717.u52HHFf3078874@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606021717.u52HHFf3078874>