cvs commit: src/sys/netinet ip_divert.c ip_input.c

Andre Oppermann oppermann at pipeline.ch
Mon Nov 17 02:36:55 PST 2003


Brian Feldman wrote:
> 
> green       2003/11/16 19:17:49 PST
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/netinet          ip_divert.c ip_input.c
>   Log:
>   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.

Ugh... Thank you.  It seems I missed that in ip_divert when doing the
change in ip_input and ip_output.  Bad me...

I'm working on moving this to real m_tags (Sam has also done a couple
of things in perforce).  However I've got the tcp_hostcache stuff on
the boiler plate first and there are some performance implications with m_tags.
Although I think it's more important to be correct if the impact is only
a couple of %.  In addition it hits only if one is actually doing divert
or ipfw fwd.  But then you are already taking a hit with sending the packet
out to userland natd and back again.  So overall it probably doesn't make
any difference in practice and using m_tags shouldn't pose any penalty.

-- 
Andre


More information about the cvs-src mailing list