mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
MFC r336405:
Move invoking of callout_stop(&lle->lle_timer) into llentry_free(). This deduplicates the code a bit, and also implicitly adds missing callout_stop() to in[6]_lltable_delete_entry() functions. PR: 209682, 225927
This commit is contained in:
parent
bb9e423bb5
commit
c652a4cf82
3 changed files with 3 additions and 9 deletions
|
|
@ -429,6 +429,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);
|
||||
|
|
@ -515,8 +518,6 @@ lltable_free(struct lltable *llt)
|
|||
IF_AFDATA_WUNLOCK(llt->llt_ifp);
|
||||
|
||||
LIST_FOREACH_SAFE(lle, &dchain, lle_chain, next) {
|
||||
if (callout_stop(&lle->lle_timer) > 0)
|
||||
LLE_REMREF(lle);
|
||||
llentry_free(lle);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1145,10 +1145,6 @@ in_lltable_free_entry(struct lltable *llt, struct llentry *lle)
|
|||
lltable_unlink_entry(llt, lle);
|
||||
}
|
||||
|
||||
/* cancel timer */
|
||||
if (callout_stop(&lle->lle_timer) > 0)
|
||||
LLE_REMREF(lle);
|
||||
|
||||
/* Drop hold queue */
|
||||
pkts_dropped = llentry_free(lle);
|
||||
ARPSTAT_ADD(dropped, pkts_dropped);
|
||||
|
|
|
|||
|
|
@ -2107,9 +2107,6 @@ in6_lltable_free_entry(struct lltable *llt, struct llentry *lle)
|
|||
lltable_unlink_entry(llt, lle);
|
||||
}
|
||||
|
||||
if (callout_stop(&lle->lle_timer) > 0)
|
||||
LLE_REMREF(lle);
|
||||
|
||||
llentry_free(lle);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue