summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1995-12-20 18:04:19 +0000
committerwollman <wollman@FreeBSD.org>1995-12-20 18:04:19 +0000
commitd1c087d3d5f89d423c124b7cc55fa3e76bcf733d (patch)
tree0e820adc3686a2d0cb27185c0d82d7195639075b /sys
parent901107a3b58846b2b2979e213e685b4dfb93158d (diff)
downloadFreeBSD-src-d1c087d3d5f89d423c124b7cc55fa3e76bcf733d.zip
FreeBSD-src-d1c087d3d5f89d423c124b7cc55fa3e76bcf733d.tar.gz
Demolish DIRECTED_BROADCAST. It was always a bad idea, and nobody uses it.
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_input.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 8eb91a9..61dedf1 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_input.c 8.2 (Berkeley) 1/4/94
- * $Id: ip_input.c,v 1.30 1995/12/14 09:53:41 phk Exp $
+ * $Id: ip_input.c,v 1.31 1995/12/19 20:46:15 wollman Exp $
*/
#include <sys/param.h>
@@ -77,9 +77,6 @@ struct socket *ip_rsvpd;
#ifndef IPSENDREDIRECTS
#define IPSENDREDIRECTS 1
#endif
-#ifndef DIRECTED_BROADCAST
-#define DIRECTED_BROADCAST 0
-#endif
static int ipforwarding = IPFORWARDING;
SYSCTL_INT(_net_inet_ip, IPCTL_FORWARDING, forwarding, CTLFLAG_RW,
@@ -89,10 +86,6 @@ static int ipsendredirects = IPSENDREDIRECTS;
SYSCTL_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_RW,
&ipsendredirects, 0, "");
-static int ipdirbroadcast = DIRECTED_BROADCAST;
-SYSCTL_INT(_net_inet_ip, IPCTL_DIRECTEDBROADCAST, directed_broadcast,
- CTLFLAG_RW, &ipdirbroadcast, 0, "");
-
int ip_defttl = IPDEFTTL;
SYSCTL_INT(_net_inet_ip, IPCTL_DEFTTL, ttl, CTLFLAG_RW,
&ip_defttl, 0, "");
@@ -309,15 +302,17 @@ next:
if (IA_SIN(ia)->sin_addr.s_addr == ip->ip_dst.s_addr)
goto ours;
- if ((!ipdirbroadcast || ia->ia_ifp == m->m_pkthdr.rcvif) &&
- (ia->ia_ifp->if_flags & IFF_BROADCAST)) {
+ if (ia->ia_ifp->if_flags & IFF_BROADCAST) {
+#if 1
u_long t;
+#endif
if (satosin(&ia->ia_broadaddr)->sin_addr.s_addr ==
ip->ip_dst.s_addr)
goto ours;
if (ip->ip_dst.s_addr == ia->ia_netbroadcast.s_addr)
goto ours;
+#if 1 /* XXX - this should go away */
/*
* Look for all-0's host part (old broadcast addr),
* either for subnet or net.
@@ -327,6 +322,7 @@ next:
goto ours;
if (t == ia->ia_net)
goto ours;
+#endif /* compatibility cruft */
}
}
if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
@@ -1169,11 +1165,8 @@ ip_forward(m, srcrt)
}
}
- error = ip_output(m, (struct mbuf *)0, &ipforward_rt, IP_FORWARDING
-#ifdef DIRECTED_BROADCAST
- | IP_ALLOWBROADCAST
-#endif
- , 0);
+ error = ip_output(m, (struct mbuf *)0, &ipforward_rt,
+ IP_FORWARDING, 0);
if (error)
ipstat.ips_cantforward++;
else {
OpenPOWER on IntegriCloud