diff options
-rw-r--r-- | sys/netinet/tcp_input.c | 6 | ||||
-rw-r--r-- | sys/netinet/tcp_reass.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 2fec783..7b4827a 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -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: diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 2fec783..7b4827a 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -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: |