summaryrefslogtreecommitdiff
path: root/sbin/sysctl/sysctl.c
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 /sbin/sysctl/sysctl.c
parent1feeb1c2cf20bd1832234467e5e810827c2e8491 (diff)
provide a net.inet6.ip6.ifq sysctl so people can see and fiddle
with the ip6intrq. ok claudio@
Diffstat (limited to 'sbin/sysctl/sysctl.c')
-rw-r--r--sbin/sysctl/sysctl.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index df77bca0aea..cdc1fa596cf 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysctl.c,v 1.208 2015/01/16 06:40:01 deraadt Exp $ */
+/* $OpenBSD: sysctl.c,v 1.209 2015/02/09 12:04:27 dlg Exp $ */
/* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */
/*
@@ -2129,6 +2129,20 @@ sysctl_inet6(char *string, char **bufpp, int mib[], int flags, int *typep)
return (-1);
mib[3] = indx;
*typep = lp->list[indx].ctl_type;
+ if (*typep == CTLTYPE_NODE) {
+ int tindx;
+
+ if (*bufpp == NULL) {
+ listall(string, &ifqlist);
+ return(-1);
+ }
+ lp = &ifqlist;
+ if ((tindx = findname(string, "fifth", bufpp, lp)) == -1)
+ return (-1);
+ mib[4] = tindx;
+ *typep = lp->list[tindx].ctl_type;
+ return(5);
+ }
return (4);
}
#endif