Page MenuHomeFreeBSD

Fix handling of TTL/Hop Limit and TOS/Traffic Class in the TCP SYN Cache
ClosedPublic

Authored by tuexen on Jul 31 2020, 10:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jul 19, 3:13 PM
Unknown Object (File)
Sun, Jul 19, 12:59 AM
Unknown Object (File)
Sat, Jul 18, 6:37 AM
Unknown Object (File)
Fri, Jul 17, 7:41 PM
Unknown Object (File)
Sun, Jul 12, 1:01 PM
Unknown Object (File)
Sat, Jul 11, 10:14 PM
Unknown Object (File)
Thu, Jul 9, 6:57 AM
Unknown Object (File)
Mon, Jul 6, 1:01 PM

Details

Summary

This patch fixes the following issues:

  • Let the accepted TCP/IPv4 socket inherit the configured TTL and TOS value.
  • Let the accepted TCP/IPv6 socket inherit the configured Hop Limit.
  • Use the configured Hop Limit and Traffic Class when sending IPv6 packets.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 32698

Event Timeline

donner added inline comments.
sys/netinet/tcp_syncache.c
1391–1392

May this check for IPv6 become a single test, which covers the tests below?
This would improve the reading of the whole construct.

1404–1413

A bit superfluous. isn't it?

1415–1416

This could be a single #ifdef INET (in the #ifdef INET6 scope)

sys/netinet/tcp_syncache.c
1415–1416

I'm using the pattern also used at tcp_syncache.c:1849 for consistency within the same file.

Simplify code as suggested by Lutz.

sys/netinet/tcp_syncache.c
1391–1392

Done in latest revision.

1404–1413

Should also be fixed by the latest revision.

This revision is now accepted and ready to land.Aug 10 2020, 6:34 PM