From owner-svn-src-head@FreeBSD.ORG Fri Sep 13 18:45:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1041950C; Fri, 13 Sep 2013 18:45:11 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F256C2A2D; Fri, 13 Sep 2013 18:45:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8DIjAhC085071; Fri, 13 Sep 2013 18:45:10 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8DIjAlb085069; Fri, 13 Sep 2013 18:45:10 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201309131845.r8DIjAlb085069@svn.freebsd.org> From: Mikolaj Golub Date: Fri, 13 Sep 2013 18:45:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255523 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2013 18:45:11 -0000 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);