summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2001-07-04 16:52:04 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2001-07-04 16:52:04 +0000
commit9263af4975033fd9907b459099ba61351c1e4ee1 (patch)
tree3fac57a71fdb1cc48fcbf96f4ebf255cbb1f3787 /sys
parent721246dab54485c5e00598347b8e489380774cf3 (diff)
handle m->m_pkthdr.rcvif == NULL; temporarily ok deraadt@; pending itojun@
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_icmp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index 27266a65e8c..11c8a31c6dc 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_icmp.c,v 1.41 2001/07/04 05:52:16 angelos Exp $ */
+/* $OpenBSD: ip_icmp.c,v 1.42 2001/07/04 16:52:03 dhartmei Exp $ */
/* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */
/*
@@ -508,8 +508,9 @@ icmp_input(m, va_alist)
icmpdst.sin_addr = ip->ip_src;
else
icmpdst.sin_addr = ip->ip_dst;
- ia = ifatoia(ifaof_ifpforaddr(sintosa(&icmpdst),
- m->m_pkthdr.rcvif));
+ if (m->m_pkthdr.rcvif != NULL)
+ ia = ifatoia(ifaof_ifpforaddr(sintosa(&icmpdst),
+ m->m_pkthdr.rcvif));
if (ia == 0)
break;
icp->icmp_type = ICMP_MASKREPLY;
@@ -632,7 +633,7 @@ icmp_reflect(m)
break;
}
icmpdst.sin_addr = t;
- if (ia == (struct in_ifaddr *)0)
+ if ((ia == (struct in_ifaddr *)0) && (m->m_pkthdr.rcvif != NULL))
ia = ifatoia(ifaof_ifpforaddr(sintosa(&icmpdst),
m->m_pkthdr.rcvif));
/*