aboutgitcodebugslistschat
path: root/tcp_vu.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2024-11-19 20:53:44 +0100
committerStefano Brivio <sbrivio@redhat.com>2024-11-21 06:52:36 +0100
commit238c69f9af458e41dea5ad8c988dbf65b05b5172 (patch)
treefd33e77624c4e8ad9b1812ed521beef7278c512e /tcp_vu.c
parentaf464c4ffbb7a5341f8a7beedce8382d598dbaf7 (diff)
downloadpasst-238c69f9af458e41dea5ad8c988dbf65b05b5172.tar
passt-238c69f9af458e41dea5ad8c988dbf65b05b5172.tar.gz
passt-238c69f9af458e41dea5ad8c988dbf65b05b5172.tar.bz2
passt-238c69f9af458e41dea5ad8c988dbf65b05b5172.tar.lz
passt-238c69f9af458e41dea5ad8c988dbf65b05b5172.tar.xz
passt-238c69f9af458e41dea5ad8c988dbf65b05b5172.tar.zst
passt-238c69f9af458e41dea5ad8c988dbf65b05b5172.zip
tcp: Acknowledge keep-alive segments, ignore them for the rest2024_11_21.238c69f
RFC 9293, 3.8.4 says: Implementers MAY include "keep-alives" in their TCP implementations (MAY-5), although this practice is not universally accepted. Some TCP implementations, however, have included a keep-alive mechanism. To confirm that an idle connection is still active, these implementations send a probe segment designed to elicit a response from the TCP peer. Such a segment generally contains SEG.SEQ = SND.NXT-1 and may or may not contain one garbage octet of data. If keep-alives are included, the application MUST be able to turn them on or off for each TCP connection (MUST-24), and they MUST default to off (MUST-25). but currently, tcp_data_from_tap() is not aware of this and will schedule a fast re-transmit on the second keep-alive (because it's also a duplicate ACK), ignoring the fact that the sequence number was rewinded to SND.NXT-1. ACK these keep-alive segments, reset the activity timeout, and ignore them for the rest. At some point, we could think of implementing an approximation of keep-alive segments on outbound sockets, for example by setting TCP_KEEPIDLE to 1, and a large TCP_KEEPINTVL, so that we send a single keep-alive segment at approximately the same time, and never reset the connection. That's beyond the scope of this fix, though. Reported-by: Tim Besard <tim.besard@gmail.com> Link: https://github.com/containers/podman/discussions/24572 Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tcp_vu.c')
0 files changed, 0 insertions, 0 deletions