MGETHDR() does not initialize m_pkthdr.rcvif, do it here.

This fixes page fault panic observed when diverting packets
with IP options (e.g. ping -R remoteIP over natd).

PR:	kern/8596, kern/11199
This commit is contained in:
Ruslan Ermilov 2000-01-10 18:46:05 +00:00
parent 968f82b738
commit 5db1e34ea4

View File

@ -931,6 +931,7 @@ ip_insertoptions(m, opt, phlen)
MGETHDR(n, M_DONTWAIT, MT_HEADER);
if (n == 0)
return (m);
n->m_pkthdr.rcvif = (struct ifnet *)0;
n->m_pkthdr.len = m->m_pkthdr.len + optlen;
m->m_len -= sizeof(struct ip);
m->m_data += sizeof(struct ip);