tcp: Fix re-send mechanism to tap on ACK timeout

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-07-26 14:25:16 +02:00
parent 74677bddb2
commit 0279ec8eae

3
tcp.c
View file

@ -2652,7 +2652,7 @@ static void tcp_timer_one(struct ctx *c, struct tcp_tap_conn *conn,
struct timespec *ts) struct timespec *ts)
{ {
int ack_tap_ms = timespec_diff_ms(ts, &conn->ts_ack_tap); 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); int tap_ms = timespec_diff_ms(ts, &conn->ts_tap);
switch (conn->state) { switch (conn->state) {
@ -2693,6 +2693,7 @@ static void tcp_timer_one(struct ctx *c, struct tcp_tap_conn *conn,
} }
conn->seq_to_tap = conn->seq_ack_from_tap; conn->seq_to_tap = conn->seq_ack_from_tap;
if (sock_ms > ACK_TIMEOUT)
tcp_data_from_sock(c, conn, ts); tcp_data_from_sock(c, conn, ts);
} }
} }