aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2000-01-10 18:46:05 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2000-01-10 18:46:05 +0000
commit5db1e34ea48e418c1b6734ce3b08f50c44b587f7 (patch)
tree302ea2f9bcb0a8c8685826ea1bc649ee8b2dca6b /sys
parent968f82b738e417ad28b7322ffa9a5d93b79dcd08 (diff)
downloadsrc-5db1e34ea48e418c1b6734ce3b08f50c44b587f7.tar.gz
src-5db1e34ea48e418c1b6734ce3b08f50c44b587f7.zip
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
Notes
Notes: svn path=/head/; revision=55777
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_output.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 23a5629eba47..61c8432a0ed3 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);