diff options
author | phk <phk@FreeBSD.org> | 1996-04-02 12:26:10 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-04-02 12:26:10 +0000 |
commit | 5a3487eb35f97fc893ebb2fe4c278036d3a164cd (patch) | |
tree | 747c20c256974140b61bdba37fa286365f9089de /sys/netinet | |
parent | e9ce06f14dd5784611916d8dc02d26c3cb5e9beb (diff) | |
download | FreeBSD-src-5a3487eb35f97fc893ebb2fe4c278036d3a164cd.zip FreeBSD-src-5a3487eb35f97fc893ebb2fe4c278036d3a164cd.tar.gz |
Fix two cases where ia->ia_ifp could be NULL.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_icmp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index a0ce4aa..8c5825a 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94 - * $Id: ip_icmp.c,v 1.17 1995/12/16 02:14:16 bde Exp $ + * $Id: ip_icmp.c,v 1.18 1996/03/26 19:16:43 fenner Exp $ */ #include <sys/param.h> @@ -402,6 +402,8 @@ icmp_input(m, hlen) (struct sockaddr *)&icmpdst, m->m_pkthdr.rcvif); if (ia == 0) break; + if (ia->ia_ifp == 0) + break; icp->icmp_type = ICMP_MASKREPLY; icp->icmp_mask = ia->ia_sockmask.sin_addr.s_addr; if (ip->ip_src.s_addr == 0) { @@ -503,7 +505,7 @@ icmp_reflect(m) for (ia = in_ifaddr; ia; ia = ia->ia_next) { if (t.s_addr == IA_SIN(ia)->sin_addr.s_addr) break; - if ((ia->ia_ifp->if_flags & IFF_BROADCAST) && + if (ia->ia_ifp && (ia->ia_ifp->if_flags & IFF_BROADCAST) && t.s_addr == satosin(&ia->ia_broadaddr)->sin_addr.s_addr) break; } |