diff options
author | green <green@FreeBSD.org> | 2003-11-17 03:17:49 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2003-11-17 03:17:49 +0000 |
commit | fc779a75730f7e46f008a4bf5649eeaf5adba7cf (patch) | |
tree | 1ee8c939cbd44fe750095adfe0c6be3798857f19 /sys/netinet/ip_divert.c | |
parent | 1c7581a7316f0b661df3fc8606e212d1ba66404e (diff) | |
download | FreeBSD-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.c | 1 |
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 |