Index: ip_input.c =================================================================== RCS file: /home/ncvs/src/sys/netinet/ip_input.c,v retrieving revision 1.149 diff -u -u -2 -0 -r1.149 ip_input.c --- ip_input.c 2000/11/25 07:35:33 1.149 +++ ip_input.c 2001/01/31 08:34:55 @@ -489,41 +489,42 @@ #ifdef BOOTP_COMPAT if (IA_SIN(ia)->sin_addr.s_addr == INADDR_ANY) goto ours; #endif #ifdef IPFIREWALL_FORWARD /* * If the addr to forward to is one of ours, we pretend to * be the destination for this packet. */ if (ip_fw_fwd_addr == NULL) { if (IA_SIN(ia)->sin_addr.s_addr == ip->ip_dst.s_addr) goto ours; } else if (IA_SIN(ia)->sin_addr.s_addr == ip_fw_fwd_addr->sin_addr.s_addr) goto ours; #else if (IA_SIN(ia)->sin_addr.s_addr == ip->ip_dst.s_addr) goto ours; #endif - if (ia->ia_ifp && ia->ia_ifp->if_flags & IFF_BROADCAST) { + if (ia->ia_ifp && ia->ia_ifp->if_flags & IFF_BROADCAST && + ia->ia_netmask != 0xffffffff) { 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 (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) { struct in_multi *inm; if (ip_mrouter) { /* * If we are acting as a multicast router, all * incoming multicast packets are passed to the * kernel-level multicast forwarding function. * The packet is returned (relatively) intact; if * ip_mforward() returns a non-zero value, the packet * must be discarded, else it may be accepted below. */ if (ip_mforward(ip, m->m_pkthdr.rcvif, m, 0) != 0) { ipstat.ips_cantforward++;