summaryrefslogtreecommitdiffstats
path: root/sys/netinet/in_pcb.c
diff options
context:
space:
mode:
authorvgross <vgross@openbsd.org>2015-12-18 22:25:16 +0000
committervgross <vgross@openbsd.org>2015-12-18 22:25:16 +0000
commit79e2bfee1e5b8748c3d0d0dfe91eccaa5c8323dd (patch)
tree348902598065aa050403591771abd269300855fe /sys/netinet/in_pcb.c
parentCheck ioctl() result with == -1, not < 0. Break long line. (diff)
downloadwireguard-openbsd-79e2bfee1e5b8748c3d0d0dfe91eccaa5c8323dd.tar.xz
wireguard-openbsd-79e2bfee1e5b8748c3d0d0dfe91eccaa5c8323dd.zip
Fix SO_REUSE* flags effects when binding multicast addresses. No
regression observed on avahi. ok benno@
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r--sys/netinet/in_pcb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 4600fe12302..e51e8dcf8fc 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_pcb.c,v 1.194 2015/12/03 21:57:59 mpi Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.195 2015/12/18 22:25:16 vgross Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
@@ -318,7 +318,7 @@ in_pcbbind(struct inpcb *inp, struct mbuf *nam, struct proc *p)
* and a multicast address is bound on both
* new and duplicated sockets.
*/
- if (so->so_options & SO_REUSEADDR)
+ if (so->so_options & (SO_REUSEADDR|SO_REUSEPORT))
reuseport = SO_REUSEADDR|SO_REUSEPORT;
} else if (sin->sin_addr.s_addr != INADDR_ANY) {
sin->sin_port = 0; /* yech... */