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
This commit is contained in:
Kristof Provost 2018-11-02 16:53:15 +00:00
parent 25c6ab1b78
commit 26549dfcad
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=340067

View File

@ -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