aboutgitcodebugslistschat
path: root/tcp.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-10-05 23:21:40 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-10-05 23:21:40 +0200
commit8131fc91757626ab85fc5964fb776c54728a58ae (patch)
treea88ed23229a2f848f29cecb93557094de4119349 /tcp.c
parentccbf13ed1b74e643b0129a0cafff600d296ffe90 (diff)
downloadpasst-8131fc91757626ab85fc5964fb776c54728a58ae.tar
passt-8131fc91757626ab85fc5964fb776c54728a58ae.tar.gz
passt-8131fc91757626ab85fc5964fb776c54728a58ae.tar.bz2
passt-8131fc91757626ab85fc5964fb776c54728a58ae.tar.lz
passt-8131fc91757626ab85fc5964fb776c54728a58ae.tar.xz
passt-8131fc91757626ab85fc5964fb776c54728a58ae.tar.zst
passt-8131fc91757626ab85fc5964fb776c54728a58ae.zip
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>
Diffstat (limited to 'tcp.c')
-rw-r--r--tcp.c2
1 files changed, 1 insertions, 1 deletions
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." */