In timewait state, if the incoming segment is a pure in-sequence ack

that matches snd_max, then do not respond with an ack, just drop the
segment.  This fixes a problem where a simultaneous close results in
an ack loop between two time-wait states.

Test case supplied by: Tim Robbins <tjr@FreeBSD.ORG>
Sponsored by: DARPA, NAI Labs
This commit is contained in:
Jonathan Lemon 2003-02-26 18:20:41 +00:00
parent f1dacb5270
commit 272c5dfe93
2 changed files with 8 additions and 4 deletions

View File

@ -2913,9 +2913,11 @@ tcp_timewait(tw, to, th, m, tlen)
}
/*
* Acknowlege the segment, then drop it.
* Acknowledge the segment if it has data or is not a duplicate ACK.
*/
tcp_twrespond(tw, TH_ACK);
if (thflags != TH_ACK || tlen != 0 ||
th->th_seq != tw->rcv_nxt || th->th_ack != tw->snd_nxt)
tcp_twrespond(tw, TH_ACK);
goto drop;
reset:

View File

@ -2913,9 +2913,11 @@ tcp_timewait(tw, to, th, m, tlen)
}
/*
* Acknowlege the segment, then drop it.
* Acknowledge the segment if it has data or is not a duplicate ACK.
*/
tcp_twrespond(tw, TH_ACK);
if (thflags != TH_ACK || tlen != 0 ||
th->th_seq != tw->rcv_nxt || th->th_ack != tw->snd_nxt)
tcp_twrespond(tw, TH_ACK);
goto drop;
reset: