summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_divert.c
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2003-11-17 03:17:49 +0000
committergreen <green@FreeBSD.org>2003-11-17 03:17:49 +0000
commitfc779a75730f7e46f008a4bf5649eeaf5adba7cf (patch)
tree1ee8c939cbd44fe750095adfe0c6be3798857f19 /sys/netinet/ip_divert.c
parent1c7581a7316f0b661df3fc8606e212d1ba66404e (diff)
downloadFreeBSD-src-fc779a75730f7e46f008a4bf5649eeaf5adba7cf.zip
FreeBSD-src-fc779a75730f7e46f008a4bf5649eeaf5adba7cf.tar.gz
Fix a few cases where MT_TAG-type "fake mbufs" are created on the stack, but
do not have mh_nextpkt initialized. Somtimes what's there is "1", and the ip_input() code pukes trying to m_free() it, rendering divert sockets and such broken. This really underscores the need to get rid of MT_TAG. Reviewed by: rwatson
Diffstat (limited to 'sys/netinet/ip_divert.c')
-rw-r--r--sys/netinet/ip_divert.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index 5b44527..7e939e3 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -284,6 +284,7 @@ div_output(struct socket *so, struct mbuf *m,
divert_tag.mh_flags = PACKET_TAG_DIVERT;
divert_tag.mh_next = m;
divert_tag.mh_data = 0; /* the matching rule # */
+ divert_tag.mh_nextpkt = NULL;
m->m_pkthdr.rcvif = NULL; /* XXX is it necessary ? */
#ifdef MAC
OpenPOWER on IntegriCloud