From 8131fc91757626ab85fc5964fb776c54728a58ae Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Tue, 5 Oct 2021 23:21:40 +0200 Subject: 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 --- tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tcp.c') diff --git a/tcp.c b/tcp.c index 9bb2efe..43e3ea3 100644 --- a/tcp.c +++ b/tcp.c @@ -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." */ -- cgit v1.2.3