Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175794146
D60651.id189612.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D60651.id189612.diff
View Options
diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -7974,8 +7974,6 @@
}
sx_xunlock(&pf_end_lock);
- pf_nl_unregister();
-
if (pf_dev != NULL)
destroy_dev(pf_dev);
@@ -8003,6 +8001,26 @@
VNET_SYSUNINIT(vnet_pf_uninit, SI_SUB_PROTO_FIREWALL, SI_ORDER_THIRD,
vnet_pf_uninit, NULL);
+/*
+ * The netlink handlers use the per-vnet state: register them after
+ * vnet_pf_init() and unregister them before vnet_pf_uninit().
+ */
+static void
+pf_nl_init(void *unused __unused)
+{
+
+ pf_nl_register();
+}
+SYSINIT(pf_nl, SI_SUB_PROTO_FIREWALL, SI_ORDER_FOURTH, pf_nl_init, NULL);
+
+static void
+pf_nl_uninit(void *unused __unused)
+{
+
+ pf_nl_unregister();
+}
+SYSUNINIT(pf_nl, SI_SUB_PROTO_FIREWALL, SI_ORDER_FOURTH, pf_nl_uninit, NULL);
+
static int
pf_modevent(module_t mod, int type, void *data)
{
@@ -8011,7 +8029,6 @@
switch(type) {
case MOD_LOAD:
error = pf_load();
- pf_nl_register();
break;
case MOD_UNLOAD:
/* Handled in SYSUNINIT(pf_unload) to ensure it's done after
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 14, 10:07 AM (4 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40758881
Default Alt Text
D60651.id189612.diff (1 KB)
Attached To
Mode
D60651: pf: Register the netlink family only while the vnets are set up
Attached
Detach File
Event Timeline
Log In to Comment