diff options
Diffstat (limited to 'sys/netinet/ip_fw2.c')
-rw-r--r-- | sys/netinet/ip_fw2.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index 965cddb..65a2e26 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -3603,6 +3603,12 @@ remove_rule(struct ip_fw_chain *chain, struct ip_fw *rule, return n; } +/* + * Hook for cleaning up dummynet when an ipfw rule is deleted. + * Set/cleared when dummynet module is loaded/unloaded. + */ +void (*ip_dn_ruledel_ptr)(void *) = NULL; + /** * Reclaim storage associated with a list of rules. This is * typically the list created using remove_rule. @@ -3614,7 +3620,7 @@ reap_rules(struct ip_fw *head) while ((rule = head) != NULL) { head = head->next; - if (DUMMYNET_LOADED) + if (ip_dn_ruledel_ptr) ip_dn_ruledel_ptr(rule); free(rule, M_IPFW); } |