diff options
-rw-r--r-- | sys/netinet/ip_icmp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 11c8a31c6dc..0fbc68d3070 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_icmp.c,v 1.42 2001/07/04 16:52:03 dhartmei Exp $ */ +/* $OpenBSD: ip_icmp.c,v 1.43 2002/01/05 00:20:45 nordin Exp $ */ /* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */ /* @@ -508,9 +508,10 @@ icmp_input(m, va_alist) icmpdst.sin_addr = ip->ip_src; else icmpdst.sin_addr = ip->ip_dst; - if (m->m_pkthdr.rcvif != NULL) - ia = ifatoia(ifaof_ifpforaddr(sintosa(&icmpdst), - m->m_pkthdr.rcvif)); + if (m->m_pkthdr.rcvif == NULL) + break; + ia = ifatoia(ifaof_ifpforaddr(sintosa(&icmpdst), + m->m_pkthdr.rcvif)); if (ia == 0) break; icp->icmp_type = ICMP_MASKREPLY; |