mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-16 21:34:10 +00:00
An existing incomplete ARP entry would expire a subsequent
statically configured entry of the same host. This bug was due to the expiration timer was not cancelled when installing the static entry. Since there exist a potential race condition with respect to timer cancellation, simply check for the LLE_STATIC bit inside the expiration function instead of cancelling the active timer. MFC after: 5 days
This commit is contained in:
parent
6f1828763e
commit
ee8a75d320
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=201544
|
@ -175,18 +175,24 @@ arptimer(void *arg)
|
|||
CURVNET_SET(ifp->if_vnet);
|
||||
IF_AFDATA_LOCK(ifp);
|
||||
LLE_WLOCK(lle);
|
||||
if ((!callout_pending(&lle->la_timer) &&
|
||||
callout_active(&lle->la_timer))) {
|
||||
(void) llentry_free(lle);
|
||||
ARPSTAT_INC(timeouts);
|
||||
}
|
||||
#ifdef DIAGNOSTIC
|
||||
if (lle->la_flags & LLE_STATIC)
|
||||
LLE_WUNLOCK(lle);
|
||||
else {
|
||||
struct sockaddr *l3addr = L3_ADDR(lle);
|
||||
log(LOG_INFO, "arptimer issue: %p, IPv4 address: \"%s\"\n", lle,
|
||||
inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr));
|
||||
}
|
||||
if (!callout_pending(&lle->la_timer) &&
|
||||
callout_active(&lle->la_timer)) {
|
||||
(void) llentry_free(lle);
|
||||
ARPSTAT_INC(timeouts);
|
||||
}
|
||||
#ifdef DIAGNOSTIC
|
||||
else {
|
||||
struct sockaddr *l3addr = L3_ADDR(lle);
|
||||
log(LOG_INFO,
|
||||
"arptimer issue: %p, IPv4 address: \"%s\"\n", lle,
|
||||
inet_ntoa(
|
||||
((const struct sockaddr_in *)l3addr)->sin_addr));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
IF_AFDATA_UNLOCK(ifp);
|
||||
CURVNET_RESTORE();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue