Page MenuHomeFreeBSD

tcp rack: do not send a challenge ack in the front stages
ClosedPublic

Authored by tuexen on May 8 2024, 1:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 3, 9:17 PM
Unknown Object (File)
Oct 3 2024, 10:02 AM
Unknown Object (File)
Sep 24 2024, 4:40 PM
Unknown Object (File)
Sep 24 2024, 8:23 AM
Unknown Object (File)
Sep 23 2024, 4:43 PM
Unknown Object (File)
Sep 23 2024, 7:12 AM
Unknown Object (File)
Sep 20 2024, 6:23 PM
Unknown Object (File)
Sep 19 2024, 5:02 PM

Details

Summary

When the RACK stack wants to send a FIN, but still has outstanding or unsent data, it sends a challenge ack. Don't do this when the TCP endpoint is still in the front states.

Test Plan

Use the following packetdrill script:

 0.000 `sysctl -w net.inet.tcp.rfc1323=1`
+0.000 `sysctl -w net.inet.tcp.sack.enable=1`
+0.000 `sysctl -w net.inet.tcp.ecn.enable=2`
+0.000 `sysctl -w kern.ipc.maxsockbuf=2097152`
+0.000 `sysctl -w net.inet.tcp.recvspace=65536`
+0.000 `sysctl -w net.inet.tcp.sendspace=32768`

// Reset the TCP fast open connection cache.
+0.000 `sysctl -w net.inet.tcp.fastopen.client_enable=0`
+0.000 `sysctl -w net.inet.tcp.fastopen.client_enable=1`

+0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0.000 setsockopt(3, IPPROTO_TCP, TCP_LOG, [TCP_LOG_STATE_CONTINUAL], 4) = 0
+0.000 setsockopt(3, IPPROTO_TCP, TCP_FASTOPEN, [1], 4) = 0
+0.000 sendto(3, ..., 1, 0, ..., ...) = 1
+0.000 > S  0:0(0)       win 65535 <mss 1460,nop,wscale 6,sackOK,TS val 1000 ecr 0,FO,eol,eol>
+0.000 close(3) = 0
+1.000 > S  0:0(0)       win 65535 <mss 1460,nop,wscale 6,sackOK,TS val 2000 ecr 0>

Diff Detail

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