summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2011-04-28 09:56:27 +0000
committerclaudio <claudio@openbsd.org>2011-04-28 09:56:27 +0000
commite26c6cbc2bb00d9320b34143efeda34f0c4b0dd8 (patch)
tree2735dacd20d140c8e915cca6513a5ff41035c4aa /sys/netinet/tcp_usrreq.c
parentremove horrible abuse of kthread_create_deferred(9). this was being (diff)
downloadwireguard-openbsd-e26c6cbc2bb00d9320b34143efeda34f0c4b0dd8.tar.xz
wireguard-openbsd-e26c6cbc2bb00d9320b34143efeda34f0c4b0dd8.zip
Make in_broadcast() rdomain aware. Mostly mechanical change.
This fixes the problem of binding sockets to broadcast IPs in other rdomains. OK henning@
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index f5b5096dd9d..2e14907f448 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_usrreq.c,v 1.106 2011/04/04 21:11:22 claudio Exp $ */
+/* $OpenBSD: tcp_usrreq.c,v 1.107 2011/04/28 09:56:27 claudio Exp $ */
/* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */
/*
@@ -288,7 +288,8 @@ tcp_usrreq(so, req, m, nam, control, p)
{
if ((sin->sin_addr.s_addr == INADDR_ANY) ||
IN_MULTICAST(sin->sin_addr.s_addr) ||
- in_broadcast(sin->sin_addr, NULL)) {
+ in_broadcast(sin->sin_addr, NULL,
+ inp->inp_rtableid)) {
error = EINVAL;
break;
}