1
0
mirror of https://passt.top/passt synced 2024-07-03 00:12:41 +00:00

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 <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-09-14 16:43:48 +02:00
parent e0530a802f
commit 2c009e8e6f

2
tcp.c
View File

@ -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 {