summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2015-02-09 12:04:28 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2015-02-09 12:04:28 +0000
commit5b0ec66d129a52b7a9e38bf18ec5eff7effc9742 (patch)
tree07eddf0bd60d5f29dee9e8e2f554f5ba1a067ab3 /sys/netinet6
parent1feeb1c2cf20bd1832234467e5e810827c2e8491 (diff)
provide a net.inet6.ip6.ifq sysctl so people can see and fiddle
with the ip6intrq. ok claudio@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6.h6
-rw-r--r--sys/netinet6/ip6_input.c11
2 files changed, 11 insertions, 6 deletions
diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h
index ec34e7f521e..ab263276b35 100644
--- a/sys/netinet6/in6.h
+++ b/sys/netinet6/in6.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.h,v 1.78 2015/01/10 11:43:37 mpi Exp $ */
+/* $OpenBSD: in6.h,v 1.79 2015/02/09 12:04:27 dlg Exp $ */
/* $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ */
/*
@@ -606,7 +606,8 @@ ifatoia6(struct ifaddr *ifa)
#define IPV6CTL_MAXDYNROUTES 48
#define IPV6CTL_DAD_PENDING 49
#define IPV6CTL_MTUDISCTIMEOUT 50
-#define IPV6CTL_MAXID 51
+#define IPV6CTL_IFQUEUE 51
+#define IPV6CTL_MAXID 52
/* New entries should be added here from current IPV6CTL_MAXID value. */
/* to define items, should talk with KAME guys first, for *BSD compatibility */
@@ -663,6 +664,7 @@ ifatoia6(struct ifaddr *ifa)
{ "maxdynroutes", CTLTYPE_INT }, \
{ "dad_pending", CTLTYPE_INT }, \
{ "mtudisctimeout", CTLTYPE_INT }, \
+ { "ifq", CTLTYPE_NODE }, \
}
#define IPV6CTL_VARS { \
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index 522d579ca24..a3bec2816f5 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_input.c,v 1.137 2015/02/09 09:50:00 mpi Exp $ */
+/* $OpenBSD: ip6_input.c,v 1.138 2015/02/09 12:04:27 dlg Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -1405,9 +1405,9 @@ ip6_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp,
#endif
int error, s;
- /* All sysctl names at this level are terminal. */
- if (namelen != 1)
- return ENOTDIR;
+ /* Almost all sysctl names at this level are terminal. */
+ if (namelen != 1 && name[0] != IPV6CTL_IFQUEUE)
+ return (ENOTDIR);
switch (name[0]) {
case IPV6CTL_V6ONLY:
@@ -1444,6 +1444,9 @@ ip6_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp,
splx(s);
}
return (error);
+ case IPV6CTL_IFQUEUE:
+ return (sysctl_ifq(name + 1, namelen - 1,
+ oldp, oldlenp, newp, newlen, &ip6intrq));
default:
if (name[0] < IPV6CTL_MAXID)
return (sysctl_int_arr(ipv6ctl_vars, name, namelen,