aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-07-26 14:25:16 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-07-26 14:25:16 +0200
commit0279ec8eaebf0d0ae6d871f44c27db67904b8872 (patch)
treef0e21c80f11a75906e219024e8de9e2a7f3570c8
parent74677bddb2b275adb7d57bb5f1abf8ae28f10a51 (diff)
downloadpasst-0279ec8eaebf0d0ae6d871f44c27db67904b8872.tar
passt-0279ec8eaebf0d0ae6d871f44c27db67904b8872.tar.gz
passt-0279ec8eaebf0d0ae6d871f44c27db67904b8872.tar.bz2
passt-0279ec8eaebf0d0ae6d871f44c27db67904b8872.tar.lz
passt-0279ec8eaebf0d0ae6d871f44c27db67904b8872.tar.xz
passt-0279ec8eaebf0d0ae6d871f44c27db67904b8872.tar.zst
passt-0279ec8eaebf0d0ae6d871f44c27db67904b8872.zip
tcp: Fix re-send mechanism to tap on ACK timeout
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--tcp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tcp.c b/tcp.c
index 4cba4b8..1a914c9 100644
--- a/tcp.c
+++ b/tcp.c
@@ -2652,7 +2652,7 @@ static void tcp_timer_one(struct ctx *c, struct tcp_tap_conn *conn,
struct timespec *ts)
{
int ack_tap_ms = timespec_diff_ms(ts, &conn->ts_ack_tap);
- int sock_ms = timespec_diff_ms(ts, &conn->ts_tap);
+ int sock_ms = timespec_diff_ms(ts, &conn->ts_sock);
int tap_ms = timespec_diff_ms(ts, &conn->ts_tap);
switch (conn->state) {
@@ -2693,7 +2693,8 @@ static void tcp_timer_one(struct ctx *c, struct tcp_tap_conn *conn,
}
conn->seq_to_tap = conn->seq_ack_from_tap;
- tcp_data_from_sock(c, conn, ts);
+ if (sock_ms > ACK_TIMEOUT)
+ tcp_data_from_sock(c, conn, ts);
}
}