aboutgitcodebugslistschat
path: root/tcp.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-07-24 13:31:09 +1000
committerStefano Brivio <sbrivio@redhat.com>2024-07-24 09:27:46 +0200
commita09aeb4bd600fcb92d0341fd51858e6cee0bbea4 (patch)
treed2761fdf6c954c7c991b81cd3446ab6d90460fdc /tcp.c
parent9cb6b508157a92bc0c5c0f71d6b3d09a628a0766 (diff)
downloadpasst-a09aeb4bd600fcb92d0341fd51858e6cee0bbea4.tar
passt-a09aeb4bd600fcb92d0341fd51858e6cee0bbea4.tar.gz
passt-a09aeb4bd600fcb92d0341fd51858e6cee0bbea4.tar.bz2
passt-a09aeb4bd600fcb92d0341fd51858e6cee0bbea4.tar.lz
passt-a09aeb4bd600fcb92d0341fd51858e6cee0bbea4.tar.xz
passt-a09aeb4bd600fcb92d0341fd51858e6cee0bbea4.tar.zst
passt-a09aeb4bd600fcb92d0341fd51858e6cee0bbea4.zip
tcp: Correctly update SO_PEEK_OFF when tcp_send_frames() drops frames
When using the new SO_PEEK_OFF feature on TCP sockets, we must adjust the SO_PEEK_OFF value whenever we move conn->seq_to_tap backwards. Although it was discussed during development, somewhere during the shuffles the case where we move the pointer backwards because we lost frames while sending them to the guest. This can happen, for example, if the socket buffer on the Unix socket to qemu overflows. Fixing this is slightly complicated because we need to pass a non-const context pointer to some places we previously didn't need it. While we're there also fix a small stylistic issue in the function comment for tcp_revert_seq() - it was using spaces instead of tabs. Fixes: e63d281871ef ("tcp: leverage support of SO_PEEK_OFF socket option when available") Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp.c')
0 files changed, 0 insertions, 0 deletions