mirror of
https://github.com/soypat/lneto.git
synced 2026-08-21 06:59:04 +00:00
tcp: bugfix for missing ack for window rejected segments (#45)
This commit is contained in:
@@ -445,6 +445,14 @@ func (tcb *ControlBlock) validateIncomingSegment(seg Segment) (err error) {
|
||||
err = errRequireSequential
|
||||
}
|
||||
if err != nil {
|
||||
// RFC 9293 §3.4: If segment not acceptable, send ACK (unless RST).
|
||||
switch err {
|
||||
case errSeqNotInWindow, errLastNotInWindow, errRequireSequential, errZeroWindow:
|
||||
if !flags.HasAny(FlagRST) {
|
||||
tcb.challengeAck = true
|
||||
tcb.pending[0] |= FlagACK
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
if flags.HasAny(FlagRST) {
|
||||
|
||||
Reference in New Issue
Block a user