aboutgitcodebugslistschat
path: root/tcp.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-09-14 16:43:48 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-09-14 16:57:50 +0200
commit2c009e8e6f844669451b822ea2ffca2ba721d949 (patch)
tree35341916dca07a86dd0a7990f9dec6366a72abc8 /tcp.c
parente0530a802fb1455b15fdcc729280384368fde889 (diff)
downloadpasst-2c009e8e6f844669451b822ea2ffca2ba721d949.tar
passt-2c009e8e6f844669451b822ea2ffca2ba721d949.tar.gz
passt-2c009e8e6f844669451b822ea2ffca2ba721d949.tar.bz2
passt-2c009e8e6f844669451b822ea2ffca2ba721d949.tar.lz
passt-2c009e8e6f844669451b822ea2ffca2ba721d949.tar.xz
passt-2c009e8e6f844669451b822ea2ffca2ba721d949.tar.zst
passt-2c009e8e6f844669451b822ea2ffca2ba721d949.zip
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>
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 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 {