Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147693505
D38167.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
985 B
Referenced Files
None
Subscribers
None
D38167.diff
View Options
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -216,8 +216,8 @@
SYSCTL_NODE(_net_inet, IPPROTO_CARP, carp, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"CARP");
SYSCTL_PROC(_net_inet_carp, OID_AUTO, allow,
- CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
- 0, 0, carp_allow_sysctl, "I",
+ CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
+ &VNET_NAME(carp_allow), 0, carp_allow_sysctl, "I",
"Accept incoming CARP packets");
SYSCTL_PROC(_net_inet_carp, OID_AUTO, dscp,
CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
@@ -2197,6 +2197,15 @@
sx_destroy(&carp_sx);
}
+static void
+ipcarp_sysinit(void)
+{
+
+ /* Load allow as tunable so to postpone carp start after module load */
+ TUNABLE_INT_FETCH("net.inet.carp.allow", &V_carp_allow);
+}
+VNET_SYSINIT(ip_carp, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, ipcarp_sysinit, NULL);
+
static int
carp_mod_load(void)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 13, 11:29 PM (20 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29641554
Default Alt Text
D38167.diff (985 B)
Attached To
Mode
D38167: Turn net.inet.carp.allow into a RW tunable
Attached
Detach File
Event Timeline
Log In to Comment