diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2021-09-14 16:50:09 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2021-09-14 16:57:50 +0200 |
commit | 7c82ea4dd910bd68214c41d9c872e73cf2dc8554 (patch) | |
tree | 59fe52d3ee2b29ee4a22299f862cb267e6c99407 | |
parent | c162f1e80197f4801f89638db741cfe372c4f215 (diff) | |
download | passt-7c82ea4dd910bd68214c41d9c872e73cf2dc8554.tar passt-7c82ea4dd910bd68214c41d9c872e73cf2dc8554.tar.gz passt-7c82ea4dd910bd68214c41d9c872e73cf2dc8554.tar.bz2 passt-7c82ea4dd910bd68214c41d9c872e73cf2dc8554.tar.lz passt-7c82ea4dd910bd68214c41d9c872e73cf2dc8554.tar.xz passt-7c82ea4dd910bd68214c41d9c872e73cf2dc8554.tar.zst passt-7c82ea4dd910bd68214c41d9c872e73cf2dc8554.zip |
tcp: Don't mistake a FIN segment with no data for a Fast Retransmit request
It carries no data and usually duplicates the previous ACK sequence,
but it's just a FIN.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | tcp.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2007,7 +2007,8 @@ static void tcp_data_from_tap(struct ctx *c, struct tcp_tap_conn *conn, ack_seq - max_ack_seq < MAX_WINDOW) { /* Fast re-transmit */ - retr = !len && ack_seq == max_ack_seq && + retr = !len && !th->fin && + ack_seq == max_ack_seq && max_ack_seq_wnd == ntohs(th->window); max_ack_seq_wnd = ntohs(th->window); |