summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_output.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/ip_output.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/ip_output.c')
-rw-r--r--sys/netinet/ip_output.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 26fa3fa1b56..6c5a3d0c9ca 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_output.c,v 1.218 2011/04/05 20:33:12 henning Exp $ */
+/* $OpenBSD: ip_output.c,v 1.219 2011/04/28 09:56:27 claudio Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
@@ -544,7 +544,8 @@ reroute:
* such a packet; if the packet is going in an IPsec tunnel, skip
* this check.
*/
- if ((sproto == 0) && (in_broadcast(dst->sin_addr, ifp))) {
+ if ((sproto == 0) && (in_broadcast(dst->sin_addr, ifp,
+ m->m_pkthdr.rdomain))) {
if ((ifp->if_flags & IFF_BROADCAST) == 0) {
error = EADDRNOTAVAIL;
goto bad;