TCP retransmission fixes and fuzz failure fixes (#59)

* fix for #58

* add fixes for both retransmit and fuzz failure found

* fix infinite challenge ack due to RST+SYN+FIN corrupt packet in SYNRCV state

* fuzz: previous recovery ack path led to infinite transmit

* fuzz: calculate CRCs when fuzzing to reduce search space to non-CRC error cases

* add local fuzz corpus to tests

* add more cases to fuzz corpus
This commit is contained in:
Pat Whittingslow
2026-03-20 14:25:31 +01:00
committed by GitHub
parent 493446244f
commit faae7ab076
216 changed files with 1299 additions and 35 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ func TestExchangeTest_figure12(t *testing.T) {
Action: tcp.StepBSends,
AState: tcp.StateFinWait2,
BState: tcp.StateCloseWait,
APending: &tcp.Segment{SEQ: issA + 1, ACK: issB, Flags: tcp.FlagACK, WND: windowA}, // TODO: should be nil?
APending: nil, // RFC Figure 12 shows no response from A here — bare ACK must not elicit ACK.
},
2: { // B calls Close() (RFC 9293 Figure 12 step 4). B goes to LAST-ACK.
Action: tcp.StepBCloses,