summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/net/if_llatbl.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/net/if_llatbl.c')
-rw-r--r--freebsd/sys/net/if_llatbl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/freebsd/sys/net/if_llatbl.c b/freebsd/sys/net/if_llatbl.c
index d6e9dbaf..b220d7aa 100644
--- a/freebsd/sys/net/if_llatbl.c
+++ b/freebsd/sys/net/if_llatbl.c
@@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$");
MALLOC_DEFINE(M_LLTABLE, "lltable", "link level address tables");
-static VNET_DEFINE(SLIST_HEAD(, lltable), lltables) =
+VNET_DEFINE_STATIC(SLIST_HEAD(, lltable), lltables) =
SLIST_HEAD_INITIALIZER(lltables);
#define V_lltables VNET(lltables)
@@ -438,6 +438,9 @@ llentry_free(struct llentry *lle)
pkts_dropped = lltable_drop_entry_queue(lle);
+ /* cancel timer */
+ if (callout_stop(&lle->lle_timer) > 0)
+ LLE_REMREF(lle);
LLE_FREE_LOCKED(lle);
return (pkts_dropped);
@@ -524,8 +527,6 @@ lltable_free(struct lltable *llt)
IF_AFDATA_WUNLOCK(llt->llt_ifp);
CK_LIST_FOREACH_SAFE(lle, &dchain, lle_chain, next) {
- if (callout_stop(&lle->lle_timer) > 0)
- LLE_REMREF(lle);
llentry_free(lle);
}