From owner-svn-src-stable@freebsd.org Wed Aug 7 01:34:41 2019 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB62AB9CC0; Wed, 7 Aug 2019 01:34:41 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 463DZT5zgBz42Zk; Wed, 7 Aug 2019 01:34:41 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C40325166; Wed, 7 Aug 2019 01:34:41 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x771Yfej043643; Wed, 7 Aug 2019 01:34:41 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x771YflI043640; Wed, 7 Aug 2019 01:34:41 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201908070134.x771YflI043640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 7 Aug 2019 01:34:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350669 - stable/11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: stable/11/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 350669 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Aug 2019 01:34:42 -0000 Author: cy Date: Wed Aug 7 01:34:41 2019 New Revision: 350669 URL: https://svnweb.freebsd.org/changeset/base/350669 Log: Revert 350668 from stable/11 only. It is not at the level of VNET support. Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c stable/11/sys/contrib/ipfilter/netinet/mlfk_ipl.c Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Aug 7 01:08:57 2019 (r350668) +++ stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Aug 7 01:34:41 2019 (r350669) @@ -98,10 +98,7 @@ VNET_DEFINE(ipf_main_softc_t, ipfmain) = { # include # include -VNET_DEFINE_STATIC(eventhandler_tag, ipf_arrivetag); -VNET_DEFINE_STATIC(eventhandler_tag, ipf_departtag); -#define V_ipf_arrivetag VNET(ipf_arrivetag) -#define V_ipf_departtag VNET(ipf_departtag) +static eventhandler_tag ipf_arrivetag, ipf_departtag; #if 0 /* * Disable the "cloner" event handler; we are getting interface @@ -111,8 +108,7 @@ VNET_DEFINE_STATIC(eventhandler_tag, ipf_departtag); * If it turns out to be needed, well need a dedicated event handler * for it to deal with the ifc and the correct vnet. */ -VNET_DEFINE_STATIC(eventhandler_tag, ipf_clonetag); -#define V_ipf_clonetag VNET(ipf_clonetag) +static eventhandler_tag ipf_clonetag; #endif static void ipf_ifevent(void *arg, struct ifnet *ifp); @@ -1388,14 +1384,14 @@ int ipf_pfil_hook(void) { void ipf_event_reg(void) { - V_ipf_arrivetag = EVENTHANDLER_REGISTER(ifnet_arrival_event, \ + ipf_arrivetag = EVENTHANDLER_REGISTER(ifnet_arrival_event, \ ipf_ifevent, NULL, \ EVENTHANDLER_PRI_ANY); - V_ipf_departtag = EVENTHANDLER_REGISTER(ifnet_departure_event, \ + ipf_departtag = EVENTHANDLER_REGISTER(ifnet_departure_event, \ ipf_ifevent, NULL, \ EVENTHANDLER_PRI_ANY); #if 0 - V_ipf_clonetag = EVENTHANDLER_REGISTER(if_clone_event, ipf_ifevent, \ + ipf_clonetag = EVENTHANDLER_REGISTER(if_clone_event, ipf_ifevent, \ NULL, EVENTHANDLER_PRI_ANY); #endif } @@ -1403,15 +1399,15 @@ ipf_event_reg(void) void ipf_event_dereg(void) { - if (V_ipf_arrivetag != NULL) { - EVENTHANDLER_DEREGISTER(ifnet_arrival_event, V_ipf_arrivetag); + if (ipf_arrivetag != NULL) { + EVENTHANDLER_DEREGISTER(ifnet_arrival_event, ipf_arrivetag); } - if (V_ipf_departtag != NULL) { - EVENTHANDLER_DEREGISTER(ifnet_departure_event, V_ipf_departtag); + if (ipf_departtag != NULL) { + EVENTHANDLER_DEREGISTER(ifnet_departure_event, ipf_departtag); } #if 0 - if (V_ipf_clonetag != NULL) { - EVENTHANDLER_DEREGISTER(if_clone_event, V_ipf_clonetag); + if (ipf_clonetag != NULL) { + EVENTHANDLER_DEREGISTER(if_clone_event, ipf_clonetag); } #endif } Modified: stable/11/sys/contrib/ipfilter/netinet/mlfk_ipl.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/mlfk_ipl.c Wed Aug 7 01:08:57 2019 (r350668) +++ stable/11/sys/contrib/ipfilter/netinet/mlfk_ipl.c Wed Aug 7 01:34:41 2019 (r350669) @@ -280,10 +280,6 @@ vnet_ipf_uninit(void) V_ipfmain.ipf_running = -2; ipf_destroy_all(&V_ipfmain); - if (!IS_DEFAULT_VNET(curvnet)) { - ipf_event_dereg(); - (void)ipf_pfil_unhook(); - } } } VNET_SYSUNINIT(vnet_ipf_uninit, SI_SUB_PROTO_FIREWALL, SI_ORDER_THIRD,