Page MenuHomeFreeBSD

tcp: improve consistency of syncache_respond() failure handling
ClosedPublic

Authored by tuexen on Aug 24 2024, 3:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 2, 12:20 PM
Unknown Object (File)
Sun, Feb 2, 3:13 AM
Unknown Object (File)
Sun, Jan 26, 4:47 PM
Unknown Object (File)
Thu, Jan 23, 1:13 AM
Unknown Object (File)
Thu, Jan 23, 1:12 AM
Unknown Object (File)
Wed, Jan 22, 10:07 PM
Unknown Object (File)
Dec 9 2024, 2:40 AM
Unknown Object (File)
Dec 5 2024, 1:34 AM

Details

Summary

When the initial sending of the SYN ACK segment using syncache_respond() fails, it is handled as a permanent error. To improve consistency, apply this policy in all cases, where syncache_respond() is called. These include

  • timer based retransmissions of the SYN ACK
  • retransmitting a SYN ACK in response to a SYN retransmission
  • sending of challenge ACKs in response to received RST segments

In these cases, fall back to SYN cookies, if enabled. While there, also improve consistency of the TCP stats counters.
This was discussed at the last FreeBSD transport VC.

Diff Detail

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

Event Timeline

Besides, I am wondering if TCPSTAT_INC(tcps_sndacks) and TCPSTAT_INC(tcps_sndtotal) consistency can also be improved after successful syncache_respond().

This revision is now accepted and ready to land.Sep 4 2024, 7:20 PM

Improve consistency of the TCP stats counters as suggested by cc@.

This revision now requires review to proceed.Sep 4 2024, 10:57 PM
In D46428#1060788, @cc wrote:

Besides, I am wondering if TCPSTAT_INC(tcps_sndacks) and TCPSTAT_INC(tcps_sndtotal) consistency can also be improved after successful syncache_respond().

Thanks for the suggestion. Done in the latest version of the patch.

This revision is now accepted and ready to land.Sep 4 2024, 11:46 PM