ip_input.c (130581) | ip_input.c (130685) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 |
30 * $FreeBSD: head/sys/netinet/ip_input.c 130581 2004-06-16 08:33:09Z bms $ | 30 * $FreeBSD: head/sys/netinet/ip_input.c 130685 2004-06-18 12:58:45Z bms $ |
31 */ 32 33#include "opt_bootp.h" 34#include "opt_ipfw.h" 35#include "opt_ipdn.h" 36#include "opt_ipdivert.h" 37#include "opt_ipfilter.h" 38#include "opt_ipstealth.h" --- 543 unchanged lines hidden (view full) --- 582 /* 583 * Check for broadcast addresses. 584 * 585 * Only accept broadcast packets that arrive via the matching 586 * interface. Reception of forwarded directed broadcasts would 587 * be handled via ip_forward() and ether_output() with the loopback 588 * into the stack for SIMPLEX interfaces handled by ether_output(). 589 */ | 31 */ 32 33#include "opt_bootp.h" 34#include "opt_ipfw.h" 35#include "opt_ipdn.h" 36#include "opt_ipdivert.h" 37#include "opt_ipfilter.h" 38#include "opt_ipstealth.h" --- 543 unchanged lines hidden (view full) --- 582 /* 583 * Check for broadcast addresses. 584 * 585 * Only accept broadcast packets that arrive via the matching 586 * interface. Reception of forwarded directed broadcasts would 587 * be handled via ip_forward() and ether_output() with the loopback 588 * into the stack for SIMPLEX interfaces handled by ether_output(). 589 */ |
590 if (m->m_pkthdr.rcvif->if_flags & IFF_BROADCAST) { | 590 if (m->m_pkthdr.rcvif != NULL && 591 m->m_pkthdr.rcvif->if_flags & IFF_BROADCAST) { |
591 TAILQ_FOREACH(ifa, &m->m_pkthdr.rcvif->if_addrhead, ifa_link) { 592 if (ifa->ifa_addr->sa_family != AF_INET) 593 continue; 594 ia = ifatoia(ifa); 595 if (satosin(&ia->ia_broadaddr)->sin_addr.s_addr == 596 pkt_dst.s_addr) 597 goto ours; 598 if (ia->ia_netbroadcast.s_addr == pkt_dst.s_addr) --- 1577 unchanged lines hidden --- | 592 TAILQ_FOREACH(ifa, &m->m_pkthdr.rcvif->if_addrhead, ifa_link) { 593 if (ifa->ifa_addr->sa_family != AF_INET) 594 continue; 595 ia = ifatoia(ifa); 596 if (satosin(&ia->ia_broadaddr)->sin_addr.s_addr == 597 pkt_dst.s_addr) 598 goto ours; 599 if (ia->ia_netbroadcast.s_addr == pkt_dst.s_addr) --- 1577 unchanged lines hidden --- |