1
0
mirror of https://passt.top/passt synced 2024-12-22 13:45:32 +00:00

tcp: Check if timestamp is passed also while sending FIN to tap/guest

...it's probably possible that we might need to reset a connection
together with a FIN segment.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-10-05 23:21:40 +02:00
parent ccbf13ed1b
commit 8131fc9175

2
tcp.c
View File

@ -1641,7 +1641,7 @@ static int tcp_send_to_tap(struct ctx *c, struct tcp_tap_conn *conn, int flags,
if (th->ack && now)
conn->ts_ack_to_tap = *now;
if (th->fin)
if (th->fin && now)
conn->tap_data_noack = *now;
/* RFC 793, 3.1: "[...] and the first data octet is ISN+1." */