mirror of
https://github.com/soypat/lneto.git
synced 2026-08-30 19:39:05 +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:
@@ -386,6 +386,7 @@ func (conn *Conn) Encapsulate(carrierData []byte, offsetToIP, offsetToFrame int)
|
||||
// RFC 6298 §5.1: check RTO before sending new data.
|
||||
if conn.h.ShouldRetransmit() {
|
||||
conn.h.triggerRetransmit()
|
||||
conn.h.dupACKs = 0 // RTO is a new loss event; reset dup-ACK counter.
|
||||
}
|
||||
n, err = conn.h.Send(carrierData[offsetToFrame:])
|
||||
if err != nil || n == 0 {
|
||||
|
||||
Reference in New Issue
Block a user