summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-13 18:38:34 +0000
committerderaadt <deraadt@openbsd.org>2015-10-13 18:38:34 +0000
commitee88d605b6cb1ddcfbe580130953f8786cd91ac2 (patch)
tree3934dbca1795b9ac7ebdc0d9162268fa96402033
parentTest t16 for ed-formatted diffs does not contain a substitution. (diff)
downloadwireguard-openbsd-ee88d605b6cb1ddcfbe580130953f8786cd91ac2.tar.xz
wireguard-openbsd-ee88d605b6cb1ddcfbe580130953f8786cd91ac2.zip
NET_RT_FLAGS must also accept a proto selection.
-rw-r--r--sys/kern/kern_pledge.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c
index af54fb7dd01..2e603de7d89 100644
--- a/sys/kern/kern_pledge.c
+++ b/sys/kern/kern_pledge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_pledge.c,v 1.19 2015/10/13 16:09:24 deraadt Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.20 2015/10/13 18:38:34 deraadt Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -852,7 +852,8 @@ pledge_sysctl_check(struct proc *p, int miblen, int *mib, void *new)
if (miblen == 7 && /* exposes MACs */
mib[0] == CTL_NET && mib[1] == PF_ROUTE &&
- mib[2] == 0 && mib[3] == AF_INET &&
+ mib[2] == 0 &&
+ (mib[3] == 0 || mib[3] == AF_INET6 || mib[3] == AF_INET) &&
mib[4] == NET_RT_FLAGS && mib[5] == RTF_LLINFO)
return (0);
}