diff options
author | ru <ru@FreeBSD.org> | 2000-01-10 18:46:05 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2000-01-10 18:46:05 +0000 |
commit | 9eb1ed4d64ae60e680a6896645c44706633e2c09 (patch) | |
tree | b6dd6e6b5196b5e4ca7648e6ad05b0bd47c35350 /sys/netinet | |
parent | 59b416572e3e7deb0bb3d1386445fa783b6b63d1 (diff) | |
download | FreeBSD-src-9eb1ed4d64ae60e680a6896645c44706633e2c09.zip FreeBSD-src-9eb1ed4d64ae60e680a6896645c44706633e2c09.tar.gz |
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
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_output.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 23a5629..61c8432 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -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); |