summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2010-01-13 10:31:17 +0000
committerhenning <henning@openbsd.org>2010-01-13 10:31:17 +0000
commitcc8495022a6476ae45780b277d76c9cb0b596976 (patch)
tree8d02c2085dd95956fa7a4226a76f83ca2c71d20b
parent4.2BSD had the host parts bit of the address all zero as broadcast address. (diff)
downloadwireguard-openbsd-cc8495022a6476ae45780b277d76c9cb0b596976.tar.xz
wireguard-openbsd-cc8495022a6476ae45780b277d76c9cb0b596976.zip
no point in looking for the old "all host bits zero" broadcast address any
more here either
-rw-r--r--sys/netinet/ip_input.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 220d00c484a..0f16eb76b12 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.176 2010/01/13 07:05:28 henning Exp $ */
+/* $OpenBSD: ip_input.c,v 1.177 2010/01/13 10:31:17 henning Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -694,12 +694,7 @@ in_iawithaddr(struct in_addr ina, struct mbuf *m, u_int rdomain)
if (((ip_directedbcast == 0) || (m && ip_directedbcast &&
ia->ia_ifp == m->m_pkthdr.rcvif)) &&
(ia->ia_ifp->if_flags & IFF_BROADCAST)) {
- if (ina.s_addr == ia->ia_broadaddr.sin_addr.s_addr ||
- /*
- * Look for all-0's host part (old broadcast addr),
- * either for subnet or net.
- */
- ina.s_addr == ia->ia_net) {
+ if (ina.s_addr == ia->ia_broadaddr.sin_addr.s_addr) {
/* Make sure M_BCAST is set */
if (m)
m->m_flags |= M_BCAST;