1
0
mirror of https://passt.top/passt synced 2024-07-02 07:52:41 +00:00

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>
This commit is contained in:
Stefano Brivio 2021-09-14 16:50:09 +02:00
parent c162f1e801
commit 7c82ea4dd9

3
tcp.c
View File

@ -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);