Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Attach PF_INET6 pktq sysctls only when inet6 is pres...
details: https://anonhg.NetBSD.org/src/rev/574a78e2a0d6
branches: trunk
changeset: 807760:574a78e2a0d6
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Apr 21 10:39:41 2015 +0000
description:
Attach PF_INET6 pktq sysctls only when inet6 is present.
More modular initialization would be nicer, but at least this patch
prevents "sysctl -a" from crashing when INET6 is defined by inet6 has
not been attached.
diffstat:
sys/net/if.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 228175025ecb -r 574a78e2a0d6 sys/net/if.c
--- a/sys/net/if.c Tue Apr 21 10:12:04 2015 +0000
+++ b/sys/net/if.c Tue Apr 21 10:39:41 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.310 2015/04/20 10:19:54 roy Exp $ */
+/* $NetBSD: if.c,v 1.311 2015/04/21 10:39:41 pooka Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.310 2015/04/20 10:19:54 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.311 2015/04/21 10:39:41 pooka Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -239,7 +239,8 @@
sysctl_net_pktq_setup(NULL, PF_INET);
#endif
#ifdef INET6
- sysctl_net_pktq_setup(NULL, PF_INET6);
+ if (in6_present)
+ sysctl_net_pktq_setup(NULL, PF_INET6);
#endif
if_listener = kauth_listen_scope(KAUTH_SCOPE_NETWORK,
Home |
Main Index |
Thread Index |
Old Index