Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/in6_ifattach.c
Show First 20 Lines • Show All 475 Lines • ▼ Show 20 Lines | if ((error = in6_update_ifa(ifp, &ifra, NULL, | ||||
if (error != EAFNOSUPPORT) | if (error != EAFNOSUPPORT) | ||||
nd6log((LOG_NOTICE, "in6_ifattach_linklocal: failed to " | nd6log((LOG_NOTICE, "in6_ifattach_linklocal: failed to " | ||||
"configure a link-local address on %s " | "configure a link-local address on %s " | ||||
"(errno=%d)\n", | "(errno=%d)\n", | ||||
if_name(ifp), error)); | if_name(ifp), error)); | ||||
return (-1); | return (-1); | ||||
} | } | ||||
ia = in6ifa_ifpforlinklocal(ifp, 0); /* ia must not be NULL */ | ia = in6ifa_ifpforlinklocal(ifp, 0); | ||||
KASSERT(ia != NULL, ("%s: ia == NULL, ifp=%p", __func__, ifp)); | if (ia == NULL) { | ||||
/* This should be rare, but it happens. */ | |||||
bz: Can you turn this comment into something more meaningful given this is going to stay?
/* We… | |||||
vangyzenAuthorUnsubmitted Done Inline ActionsSure, I'll do both. The log might help the admin track down the race. vangyzen: Sure, I'll do both. The log might help the admin track down the race. | |||||
return (-1); | |||||
} | |||||
ifa_free(&ia->ia_ifa); | ifa_free(&ia->ia_ifa); | ||||
/* | /* | ||||
* Make the link-local prefix (fe80::%link/64) as on-link. | * Make the link-local prefix (fe80::%link/64) as on-link. | ||||
* Since we'd like to manage prefixes separately from addresses, | * Since we'd like to manage prefixes separately from addresses, | ||||
* we make an ND6 prefix structure for the link-local prefix, | * we make an ND6 prefix structure for the link-local prefix, | ||||
* and add it to the prefix list as a never-expire prefix. | * and add it to the prefix list as a never-expire prefix. | ||||
* XXX: this change might affect some existing code base... | * XXX: this change might affect some existing code base... | ||||
▲ Show 20 Lines • Show All 410 Lines • Show Last 20 Lines |
Can you turn this comment into something more meaningful given this is going to stay?
/* We lost a race with another thread already deleting the address. */
Or something like that? I keep wondering if another nd6log() would also help (if you do please use %s func).