summaryrefslogtreecommitdiff
path: root/sys/netinet/in.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-02-25 23:44:59 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-02-25 23:44:59 +0000
commitaef44388a7a0abed86605318e48345d9269bce90 (patch)
tree8e9ae32e47a28f2c12f05fbeea97018004d3980d /sys/netinet/in.c
parentd282def47ad33918e9dbb101237c2caceecd5642 (diff)
patch could not have been tested. panics machine on boot
Diffstat (limited to 'sys/netinet/in.c')
-rw-r--r--sys/netinet/in.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index e055aef80e6..6a16d587172 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in.c,v 1.6 1998/02/25 11:17:42 deraadt Exp $ */
+/* $OpenBSD: in.c,v 1.7 1998/02/25 23:44:57 deraadt Exp $ */
/* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */
/*
@@ -431,32 +431,19 @@ in_broadcast(in, ifp)
struct in_addr in;
struct ifnet *ifp;
{
- struct ifnet *ifn, *if_first, *if_target;
register struct ifaddr *ifa;
if (in.s_addr == INADDR_BROADCAST ||
in.s_addr == INADDR_ANY)
return 1;
- if (ifp && ((ifp->if_flags & IFF_BROADCAST) == 0))
+ if ((ifp->if_flags & IFF_BROADCAST) == 0)
return 0;
-
- if (ifp == NULL) {
- if_first = ifnet.tqh_first;
- if_target = 0;
- } else {
- if_first = ifp;
- if_target = ifp->if_list.tqe_next;
- }
-
-#define ia (ifatoia(ifa))
/*
* Look through the list of addresses for a match
* with a broadcast address.
- * If ifp is NULL, check against all the local interfaces.
*/
- for (ifn = if_first; ifn != if_target; ifn = ifn->if_list.tqe_next)
- for (ifa = ifn->if_addrlist.tqh_first; ifa;
- ifa = ifa->ifa_list.tqe_next)
+#define ia (ifatoia(ifa))
+ for (ifa = ifp->if_addrlist.tqh_first; ifa; ifa = ifa->ifa_list.tqe_next)
if (ifa->ifa_addr->sa_family == AF_INET &&
(in.s_addr == ia->ia_broadaddr.sin_addr.s_addr ||
in.s_addr == ia->ia_netbroadcast.s_addr ||