Date: Fri, 13 Sep 2013 18:45:10 +0000 (UTC) From: Mikolaj Golub <trociny@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255523 - in head/sys: netinet netinet6 Message-ID: <201309131845.r8DIjAlb085069@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trociny Date: Fri Sep 13 18:45:10 2013 New Revision: 255523 URL: http://svnweb.freebsd.org/changeset/base/255523 Log: Unregister inet/inet6 pfil hooks on vnet destroy. Discussed with: andre Approved by: re (rodrigc) Modified: head/sys/netinet/ip_input.c head/sys/netinet6/ip6_input.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Fri Sep 13 18:21:31 2013 (r255522) +++ head/sys/netinet/ip_input.c Fri Sep 13 18:45:10 2013 (r255523) @@ -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); Modified: head/sys/netinet6/ip6_input.c ============================================================================== --- head/sys/netinet6/ip6_input.c Fri Sep 13 18:21:31 2013 (r255522) +++ head/sys/netinet6/ip6_input.c Fri Sep 13 18:45:10 2013 (r255523) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309131845.r8DIjAlb085069>