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
F108231911: D46428.diff
Wed, Jan 22, 10:07 PM
Unknown Object (File)
Dec 9 2024, 2:40 AM
Unknown Object (File)
Dec 5 2024, 1:34 AM
Unknown Object (File)
Nov 28 2024, 1:01 PM
Unknown Object (File)
Nov 23 2024, 1:19 AM
Unknown Object (File)
Nov 11 2024, 5:28 AM
Unknown Object (File)
Oct 31 2024, 2:39 PM
Unknown Object (File)
Oct 31 2024, 1:47 PM

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 Skipped
Unit
Tests Skipped

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