Page MenuHomeFreeBSD

tcp: rate limit the sending of all RST segments
ClosedPublic

Authored by tuexen on Aug 8 2025, 10:41 AM.
Tags
None
Referenced Files
F154944811: D51815.id.diff
Thu, Apr 30, 6:01 AM
F154944809: D51815.id.diff
Thu, Apr 30, 6:01 AM
Unknown Object (File)
Sat, Apr 25, 6:27 AM
Unknown Object (File)
Wed, Apr 22, 5:27 PM
Unknown Object (File)
Mon, Apr 20, 8:09 AM
Unknown Object (File)
Sun, Apr 19, 4:23 PM
Unknown Object (File)
Sun, Apr 19, 7:44 AM
Unknown Object (File)
Sat, Apr 11, 2:16 AM

Details

Summary

Also rate limit the sending of RST segments in the following cases:

  • when receiving data on a closed socket.
  • when a socket can not be created at the end of the handshake and the sysctl-variable net.inet.tcp.syncache.rst_on_sock_fail is 1.
  • when an ACK segment is received in SYN SENT state and it does not acknowledge the SYN segment.

After this change, there is no need anymore to provide a rstreason to tcp_dropwithreset(), since it is always BANDLIM_TCP_RST. This will be a follow-up commit, since it will change the code in a couple of places, but will not change the functionality. So the functional change can be reviewed here.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped