summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2010-01-13 07:05:29 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2010-01-13 07:05:29 +0000
commitd0230fd127b632516030a4841cd489d96f761aba (patch)
tree24b2ebbce7ff52c5b5f30d8acb9659bf36ab08a2
parentd0bbd2d6443777ef53c24574b09427c55e04112e (diff)
we don't need broadcast for the classful network AND broadcast for the
subnet of the classful network. at least, not since 1992. ok mpf dlg bob
-rw-r--r--sys/netinet/in.c5
-rw-r--r--sys/netinet/in_var.h3
-rw-r--r--sys/netinet/ip_input.c3
3 files changed, 3 insertions, 8 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index b3d3fa0f931..014b3c56ca5 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in.c,v 1.57 2010/01/13 02:13:12 henning Exp $ */
+/* $OpenBSD: in.c,v 1.58 2010/01/13 07:05:28 henning Exp $ */
/* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */
/*
@@ -735,8 +735,6 @@ in_ifinit(ifp, ia, sin, scrub)
if (ifp->if_flags & IFF_BROADCAST) {
ia->ia_broadaddr.sin_addr.s_addr =
ia->ia_net | ~ia->ia_netmask;
- ia->ia_netbroadcast.s_addr =
- ia->ia_net | ~ia->ia_netmask;
} else if (ifp->if_flags & IFF_LOOPBACK) {
ia->ia_dstaddr = ia->ia_addr;
flags |= RTF_HOST;
@@ -925,7 +923,6 @@ in_broadcast(in, ifp)
if (ifa->ifa_addr->sa_family == AF_INET &&
in.s_addr != ia->ia_addr.sin_addr.s_addr &&
(in.s_addr == ia->ia_broadaddr.sin_addr.s_addr ||
- in.s_addr == ia->ia_netbroadcast.s_addr ||
(hostzeroisbroadcast &&
/*
* Check for old-style (host 0) broadcast.
diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h
index 41c98afe532..f09b9b54644 100644
--- a/sys/netinet/in_var.h
+++ b/sys/netinet/in_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_var.h,v 1.14 2010/01/13 01:26:28 henning Exp $ */
+/* $OpenBSD: in_var.h,v 1.15 2010/01/13 07:05:28 henning Exp $ */
/* $NetBSD: in_var.h,v 1.16 1996/02/13 23:42:15 christos Exp $ */
/*
@@ -50,7 +50,6 @@ struct in_ifaddr {
/* ia_net{,mask} in host order */
u_int32_t ia_net; /* network number of interface */
u_int32_t ia_netmask; /* mask of net part */
- struct in_addr ia_netbroadcast; /* to recognize net broadcasts */
TAILQ_ENTRY(in_ifaddr) ia_list; /* list of internet addresses */
struct sockaddr_in ia_addr; /* reserve space for interface name */
struct sockaddr_in ia_dstaddr; /* reserve space for broadcast addr */
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 85f0053d54d..220d00c484a 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.175 2010/01/13 01:26:28 henning Exp $ */
+/* $OpenBSD: ip_input.c,v 1.176 2010/01/13 07:05:28 henning Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -695,7 +695,6 @@ in_iawithaddr(struct in_addr ina, struct mbuf *m, u_int rdomain)
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 ||
- ina.s_addr == ia->ia_netbroadcast.s_addr ||
/*
* Look for all-0's host part (old broadcast addr),
* either for subnet or net.