Module Name:    src
Committed By:   pooka
Date:           Thu Sep 17 08:09:49 UTC 2009

Modified Files:
        src/sys/kern: uipc_accf.c

Log Message:
Can't use CTLFLAG_PERMANENT here without providing a rollback log,
since accept filters aren't (necessarily) added during kernel boot
phase.

pointed out & tested by Geoff Wing


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/kern/uipc_accf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/uipc_accf.c
diff -u src/sys/kern/uipc_accf.c:1.9 src/sys/kern/uipc_accf.c:1.10
--- src/sys/kern/uipc_accf.c:1.9	Wed Sep 16 15:23:04 2009
+++ src/sys/kern/uipc_accf.c	Thu Sep 17 08:09:49 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_accf.c,v 1.9 2009/09/16 15:23:04 pooka Exp $	*/
+/*	$NetBSD: uipc_accf.c,v 1.10 2009/09/17 08:09:49 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_accf.c,v 1.9 2009/09/16 15:23:04 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_accf.c,v 1.10 2009/09/17 08:09:49 pooka Exp $");
 
 #define ACCEPT_FILTER_MOD
 
@@ -87,21 +87,22 @@
 /*
  * Names of Accept filter sysctl objects
  */
+static struct sysctllog *ctllog;
 static void
-sysctl_net_inet_accf_setup(struct sysctllog **clog)
+sysctl_net_inet_accf_setup(void)
 {
 
-	sysctl_createv(clog, 0, NULL, NULL,
+	sysctl_createv(&ctllog, 0, NULL, NULL,
 		       CTLFLAG_PERMANENT,
 		       CTLTYPE_NODE, "net", NULL,
 		       NULL, 0, NULL, 0,
 		       CTL_NET, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
+	sysctl_createv(&ctllog, 0, NULL, NULL,
 		       CTLFLAG_PERMANENT,
 		       CTLTYPE_NODE, "inet", NULL,
 		       NULL, 0, NULL, 0,
 		       CTL_NET, PF_INET, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
+	sysctl_createv(&ctllog, 0, NULL, NULL,
 		       CTLFLAG_PERMANENT,
 		       CTLTYPE_NODE, "accf",
 		       SYSCTL_DESCR("Accept filters"),
@@ -185,7 +186,7 @@
 {
 
 	rw_init(&accept_filter_lock);
-	sysctl_net_inet_accf_setup(NULL);
+	sysctl_net_inet_accf_setup();
 
 	return 0;
 }

Reply via email to