nd6_dad_timer(): don't assert that the address is tentative.

It appears that this assertion can be tripped in some cases when
multiple interfaces are on the same link. Until this is resolved, revert a
part of r306305 and simply log a message if the DAD timer fires on a
non-tentative address.

Reported by:	jhb
X-MFC With:	r306305
This commit is contained in:
Mark Johnston 2016-10-01 01:30:34 +00:00
parent a3ee15f9bf
commit 0ed7d74424

View File

@ -1316,8 +1316,6 @@ nd6_dad_timer(struct dadq *dp)
char ip6buf[INET6_ADDRSTRLEN];
KASSERT(ia != NULL, ("DAD entry %p with no address", dp));
KASSERT((ia->ia6_flags & IN6_IFF_TENTATIVE) != 0,
("DAD entry %p for non-tentative address", dp));
if (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) {
/* Do not need DAD for ifdisabled interface. */
@ -1332,6 +1330,13 @@ nd6_dad_timer(struct dadq *dp)
ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???");
goto err;
}
if ((ia->ia6_flags & IN6_IFF_TENTATIVE) == 0) {
log(LOG_ERR, "nd6_dad_timer: called with non-tentative address "
"%s(%s)\n",
ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr),
ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???");
goto err;
}
/* Stop DAD if the interface is down even after dad_maxtry attempts. */
if ((dp->dad_ns_tcount > V_dad_maxtry) &&