summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-03-28 16:03:32 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-03-28 16:03:32 +0000
commit465943f3def99da7c638785f7de41a17b6d79ee8 (patch)
tree1ee611bb9add095da56f234d0e92e403691fb8f4 /sys/kern
parent3a4cb2e0560d17eb0090f95ea3ec4844e538f8e7 (diff)
Allow the multicast ttl/hops and loop options with the mcast pledge.
from Matthias Pitzl; OK deraadt@
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_pledge.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c
index 1fcbcefe101..6192797ec1c 100644
--- a/sys/kern/kern_pledge.c
+++ b/sys/kern/kern_pledge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_pledge.c,v 1.199 2017/03/27 00:33:15 deraadt Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.200 2017/03/28 16:03:31 bluhm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -1420,6 +1420,8 @@ pledge_sockopt(struct proc *p, int set, int level, int optname)
case IP_RECVDSTPORT:
return (0);
case IP_MULTICAST_IF:
+ case IP_MULTICAST_TTL:
+ case IP_MULTICAST_LOOP:
case IP_ADD_MEMBERSHIP:
case IP_DROP_MEMBERSHIP:
if (p->p_p->ps_pledge & PLEDGE_MCAST)
@@ -1443,6 +1445,8 @@ pledge_sockopt(struct proc *p, int set, int level, int optname)
#endif
return (0);
case IPV6_MULTICAST_IF:
+ case IPV6_MULTICAST_HOPS:
+ case IPV6_MULTICAST_LOOP:
case IPV6_JOIN_GROUP:
case IPV6_LEAVE_GROUP:
if (p->p_p->ps_pledge & PLEDGE_MCAST)