A bug in udp6_input() - should use proto instead of ip6->ip6_nxt

Bjoern A. Zeeb bz at FreeBSD.org
Mon Aug 31 09:28:20 UTC 2015


> On 31 Aug 2015, at 04:05 , Tiwei Bie <btw at mail.ustc.edu.cn> wrote:
> 
> I found a bug in udp6_input(). The 'proto' parameter should be used to
> get the protocol number (UDP or UDPLITE), instead of ip6->ip6_nxt.
> 
> Because ip6->ip6_nxt may be the protocol number of extension header,
> such as:
> 
> If a UDP packet is an "atomic" fragment, frag6_input() will return
> directly, and ip6->ip6_nxt will be IPPROTO_FRAGMENT (if the first
> extension header is the fragment header) instead of IPPROTO_UDP or
> IPPROTO_UDPLITE:

Hmm, that might be a bug elsewhere but atomic fragments are soon to go away again; wish people would listen in first place;  but anyway.

There are more of these bugs that came with the UDP-Lite code, such as 4mapped addresses are not handled correctly in the output path, etc.

Can you open a bug for this and we can attach all the UDP-Lite fixes to it to properly document them and get them through review in a few days and committed?


Thanks,
Bjoern


More information about the freebsd-net mailing list