From 2c009e8e6f844669451b822ea2ffca2ba721d949 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Tue, 14 Sep 2021 16:43:48 +0200 Subject: tcp: Make sure sending window is initialised before sending to tap Seen with iperf3: the first packet from socket (data connection) is 65520 bytes and doesn't fit in the window. Signed-off-by: Stefano Brivio --- tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcp.c b/tcp.c index 5b4e408..68437f2 100644 --- a/tcp.c +++ b/tcp.c @@ -1752,7 +1752,7 @@ recvmmsg: iov_tap[send_bufs - 1].iov_len = mss_tap - conn->mss_guest + last_len; /* Likely, some new data was acked too. */ - if (conn->seq_from_tap != conn->seq_ack_to_tap) { + if (conn->seq_from_tap != conn->seq_ack_to_tap || !conn->tcpi_snd_wnd) { if (conn->no_snd_wnd) { conn->seq_ack_to_tap = conn->seq_from_tap; } else { -- cgit v1.2.3