Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Can't use CTLFLAG_PERMANENT here without providing ...
details: https://anonhg.NetBSD.org/src/rev/2f2fa3a1cf20
branches: trunk
changeset: 747482:2f2fa3a1cf20
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Sep 17 08:09:49 2009 +0000
description:
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
diffstat:
sys/kern/uipc_accf.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (54 lines):
diff -r eef7ea295697 -r 2f2fa3a1cf20 sys/kern/uipc_accf.c
--- a/sys/kern/uipc_accf.c Thu Sep 17 08:07:17 2009 +0000
+++ b/sys/kern/uipc_accf.c Thu Sep 17 08:09:49 2009 +0000
@@ -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;
}
Home |
Main Index |
Thread Index |
Old Index