aboutsummaryrefslogtreecommitdiff
path: root/sys/netpfil
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2018-11-02 16:53:15 +0000
committerKristof Provost <kp@FreeBSD.org>2018-11-02 16:53:15 +0000
commit26549dfcad9a017dbab72bb306c65ce99bace946 (patch)
treed78c5d43e6c1ccfca2395a9f55831d1d1a6742fb /sys/netpfil
parent25c6ab1b78b5142503e5d03832fbe050d47a2dc5 (diff)
downloadsrc-26549dfcad9a017dbab72bb306c65ce99bace946.tar.gz
src-26549dfcad9a017dbab72bb306c65ce99bace946.zip
pfsync: Ensure uninit is done before pf
pfsync touches pf memory (for pf_state and the pfsync callback pointers), not the other way around. We need to ensure that pfsync is torn down before pf. MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D17501
Notes
Notes: svn path=/head/; revision=340067
Diffstat (limited to 'sys/netpfil')
-rw-r--r--sys/netpfil/pf/if_pfsync.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c
index 58902c278647..27862df53b6f 100644
--- a/sys/netpfil/pf/if_pfsync.c
+++ b/sys/netpfil/pf/if_pfsync.c
@@ -2362,11 +2362,8 @@ vnet_pfsync_uninit(const void *unused __unused)
if_clone_detach(V_pfsync_cloner);
swi_remove(V_pfsync_swi_cookie);
}
-/*
- * Detach after pf is gone; otherwise we might touch pfsync memory
- * from within pf after freeing pfsync.
- */
-VNET_SYSUNINIT(vnet_pfsync_uninit, SI_SUB_INIT_IF, SI_ORDER_SECOND,
+
+VNET_SYSUNINIT(vnet_pfsync_uninit, SI_SUB_PROTO_FIREWALL, SI_ORDER_FOURTH,
vnet_pfsync_uninit, NULL);
static int