mirror of
https://github.com/soypat/lneto.git
synced 2026-09-10 00:29:34 +00:00
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:
@@ -97,7 +97,12 @@ func (tcb *ControlBlock) rcvFinWait1(seg Segment) (pending Flags, err error) {
|
||||
default:
|
||||
return 0, errFinwaitExpectedACK
|
||||
}
|
||||
pending = FlagACK
|
||||
// Only queue ACK when there is data or FIN to acknowledge.
|
||||
// Bare ACKs must not elicit an ACK response; doing so creates an
|
||||
// infinite ACK ping-pong when the peer sends challenge ACKs.
|
||||
if seg.DATALEN > 0 || hasFin {
|
||||
pending = FlagACK
|
||||
}
|
||||
return pending, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user