diff options
author | trociny <trociny@FreeBSD.org> | 2013-09-13 18:45:10 +0000 |
---|---|---|
committer | trociny <trociny@FreeBSD.org> | 2013-09-13 18:45:10 +0000 |
commit | 8439b557789bea12d5048f38d8e33983b2020c61 (patch) | |
tree | 0959d2fe484f47521e820d7c43bff35f8662d42d /sys | |
parent | b61d028aaba1d450a22c74ca0b6864e4f42393a5 (diff) | |
download | FreeBSD-src-8439b557789bea12d5048f38d8e33983b2020c61.zip FreeBSD-src-8439b557789bea12d5048f38d8e33983b2020c61.tar.gz |
Unregister inet/inet6 pfil hooks on vnet destroy.
Discussed with: andre
Approved by: re (rodrigc)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_input.c | 5 | ||||
-rw-r--r-- | sys/netinet6/ip6_input.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 707d2be..c265d02 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -363,6 +363,11 @@ ip_init(void) void ip_destroy(void) { + int i; + + if ((i = pfil_head_unregister(&V_inet_pfil_hook)) != 0) + printf("%s: WARNING: unable to unregister pfil hook, " + "error %d\n", __func__, i); /* Cleanup in_ifaddr hash table; should be empty. */ hashdestroy(V_in_ifaddrhashtbl, M_IFADDR, V_in_ifaddrhmask); diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 31f048f..a94d5c2 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -307,7 +307,11 @@ ip6proto_unregister(short ip6proto) void ip6_destroy() { + int i; + if ((i = pfil_head_unregister(&V_inet6_pfil_hook)) != 0) + printf("%s: WARNING: unable to unregister pfil hook, " + "error %d\n", __func__, i); hashdestroy(V_in6_ifaddrhashtbl, M_IFADDR, V_in6_ifaddrhmask); nd6_destroy(); callout_drain(&V_in6_tmpaddrtimer_ch); |