[PATCH] Handle PACKET_TAG_IPFORWARD and TIMEWAIT state

Ed Maste emaste at freebsd.org
Fri Mar 1 16:24:04 UTC 2013


On 1 March 2013 10:53, Andrey V. Elsukov <ae at freebsd.org> wrote:
> On 01.03.2013 01:06, Ed Maste wrote:
>> On 28 February 2013 14:10, Ed Maste <emaste at freebsd.org> wrote:
>>> The attached patch keeps the fwd_tag
>>> around until finished with pcb lookup.
>>
>> There's a small bug in that patch - a corrected version, which handles
>> a NULL return from m_tag_find, can be found at:
>> http://people.freebsd.org/~emaste/patches/fwd_tag_findpcb.diff
>
> Hi Ed,
>
> it seems this problem was there before my breakage.

Yes, I had a chat with glebius@ about it, and it looks like this
problem has existed for years.

> Also, it think that m_tag_unlink is redundant here, because you clear
> the M_IP_NEXTHOP/M_IP6_NEXTHOP flag.

I split the old m_tag_delete into m_tag_unlink after finding the tag,
and m_tag_free on the exit paths from the pcb lookup.  I could leave
it attached to the mbuf and m_tag_delete it in the cases I modified,
although I don't think it makes much difference.


More information about the freebsd-net mailing list