Page MenuHomeFreeBSD

tcp: improve validation of received TCP over UDP packets
ClosedPublic

Authored by tuexen on Feb 20 2026, 8:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 19, 6:41 AM
Unknown Object (File)
Tue, Mar 17, 8:15 AM
Unknown Object (File)
Sat, Mar 14, 12:46 PM
Unknown Object (File)
Wed, Mar 11, 10:23 AM
Unknown Object (File)
Mon, Mar 9, 2:42 PM
Unknown Object (File)
Sun, Mar 8, 10:34 PM
Unknown Object (File)
Mon, Mar 2, 12:05 PM
Unknown Object (File)
Mon, Mar 2, 10:26 AM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

pouria added a subscriber: pouria.

LGTM

sys/netinet/tcp_subr.c
623

__predict_false?

I'd suggest to change to title to explictily say "TCP over UDP", cause "TCP/UDP" can be misinterpreted to a change to TCP and a similar change to UDP.

tuexen retitled this revision from tcp: improve validation of received TCP/UDP packets to tcp: improve validation of received TCP over UDP packets.Feb 20 2026, 9:12 PM
This revision is now accepted and ready to land.Feb 20 2026, 9:17 PM
tuexen added inline comments.
sys/netinet/tcp_subr.c
623

Will put that in a cleanup I will make.

I agree on @pouria's comment.

A __predict_false makes sense in the IPv6 case as well.

I agree on @pouria's comment.

A __predict_false makes sense in the IPv6 case as well.

Had to do the same for SBR-ILNP for IPv6 vs ILNPv6 flows, in ip6_forward(), when deciding whether or not to call ilnp6_forward(), which currently exists only in the sup3r s3krt bms dSBR-ILNP branch. @rgrimes will probably not have to deal with this as it wasn't really a issue for hosts.

Currently busy spinning up on SRv6. The code archeaology of FreeBSD vs source routing is a story for another time. I see @gnn knows where some of the bodies are buried there.

I agree on @pouria's comment.

A __predict_false makes sense in the IPv6 case as well.

Done in D55415.