Relocate the KASSERT for a null recvif to a location where it will

actually do some good.

Pointed out by: ru
This commit is contained in:
Jonathan Lemon 2001-10-25 05:56:30 +00:00
parent 06279b5357
commit 807b8338ba
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85465

View file

@ -607,6 +607,7 @@ icmp_reflect(m)
LIST_FOREACH(ia, INADDR_HASH(t.s_addr), ia_hash)
if (t.s_addr == IA_SIN(ia)->sin_addr.s_addr)
goto match;
KASSERT(m->m_pkthdr.rcvif != NULL, ("icmp_reflect: NULL rcvif"));
if (m->m_pkthdr.rcvif->if_flags & IFF_BROADCAST) {
TAILQ_FOREACH(ifa, &m->m_pkthdr.rcvif->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET)
@ -617,7 +618,6 @@ icmp_reflect(m)
goto match;
}
}
KASSERT(m->m_pkthdr.rcvif != NULL, ("icmp_reflect: NULL rcvif"));
icmpdst.sin_addr = t;
ia = (struct in_ifaddr *)ifaof_ifpforaddr(
(struct sockaddr *)&icmpdst, m->m_pkthdr.rcvif);