aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQing Li <qingli@FreeBSD.org>2009-10-20 21:36:56 +0000
committerQing Li <qingli@FreeBSD.org>2009-10-20 21:36:56 +0000
commit0eb4d28bac3ff3bb7cb25077042ad51f7769d888 (patch)
treef9ea4b2f568bb2257eca95e41927742dac297039
parent8ed4544ca7c66155063f4b903356e971620293e1 (diff)
Notes
-rw-r--r--sys/netinet/if_ether.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 922b5b8d51b4..be1e529bbaff 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -168,17 +168,17 @@ arptimer(void *arg)
ifp = lle->lle_tbl->llt_ifp;
IF_AFDATA_LOCK(ifp);
LLE_WLOCK(lle);
- if (((lle->la_flags & LLE_DELETED)
- || (time_second >= lle->la_expire))
- && (!callout_pending(&lle->la_timer) &&
- callout_active(&lle->la_timer)))
+ if ((!callout_pending(&lle->la_timer) &&
+ callout_active(&lle->la_timer))) {
(void) llentry_free(lle);
+ }
+#ifdef DIAGNOSTICS
else {
- /*
- * Still valid, just drop our reference
- */
- LLE_FREE_LOCKED(lle);
+ 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);
}
@@ -365,7 +365,7 @@ retry:
if (renew) {
LLE_ADDREF(la);
- la->la_expire = time_second;
+ la->la_expire = time_second + V_arpt_down;
callout_reset(&la->la_timer, hz * V_arpt_down, arptimer, la);
la->la_asked++;
LLE_WUNLOCK(la);