summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2015-10-01 10:17:28 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2015-10-01 10:17:28 +0000
commitec86329dfd38fbd485f5ee250b3d1dec4b1b0c34 (patch)
tree879414d2db6976aa91fdaa6064ccf9c2a92aa59f /sys/kern
parentff64da54336a6aa86607ae1a68d3819318ccaeb3 (diff)
add IPv6 equivalents for the permitted IPv4 setsockopts, noticed by doug@,
ok semarie@
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_tame.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/kern/kern_tame.c b/sys/kern/kern_tame.c
index 5a3b17f99d1..43e22e7371f 100644
--- a/sys/kern/kern_tame.c
+++ b/sys/kern/kern_tame.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_tame.c,v 1.45 2015/09/30 11:36:07 semarie Exp $ */
+/* $OpenBSD: kern_tame.c,v 1.46 2015/10/01 10:17:27 sthen Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -1074,6 +1074,14 @@ tame_setsockopt_check(struct proc *p, int level, int optname)
case IPPROTO_ICMP:
break;
case IPPROTO_IPV6:
+ switch (optname) {
+ case IPV6_UNICAST_HOPS:
+ case IPV6_RECVHOPLIMIT:
+ case IPV6_PORTRANGE:
+ case IPV6_RECVPKTINFO:
+ return (0);
+ }
+ break;
case IPPROTO_ICMPV6:
break;
}