aboutgitcodebugslistschat
path: root/tcp_internal.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-07-18 15:26:30 +1000
committerStefano Brivio <sbrivio@redhat.com>2024-07-19 18:32:44 +0200
commit52d45f1737ef802b09039aa31b5c137593f3cc2e (patch)
treefbdac19f01331492f6dc2507307e3be8aa684a59 /tcp_internal.h
parentf9fe212b1f2bc105939bd2603991dbcd0e6a3b5f (diff)
downloadpasst-52d45f1737ef802b09039aa31b5c137593f3cc2e.tar
passt-52d45f1737ef802b09039aa31b5c137593f3cc2e.tar.gz
passt-52d45f1737ef802b09039aa31b5c137593f3cc2e.tar.bz2
passt-52d45f1737ef802b09039aa31b5c137593f3cc2e.tar.lz
passt-52d45f1737ef802b09039aa31b5c137593f3cc2e.tar.xz
passt-52d45f1737ef802b09039aa31b5c137593f3cc2e.tar.zst
passt-52d45f1737ef802b09039aa31b5c137593f3cc2e.zip
tcp: Obtain guest address from flowside
Currently we always deliver inbound TCP packets to the guest's most recent observed IP address. This has the odd side effect that if the guest changes its IP address with active TCP connections we might deliver packets from old connections to the new address. That won't work; it will probably result in an RST from the guest. Worse, if the guest added a new address but also retains the old one, then we could break those old connections by redirecting them to the new address. Now that we maintain flowside information, we have a record of the correct guest side address and can just use it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp_internal.h')
-rw-r--r--tcp_internal.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/tcp_internal.h b/tcp_internal.h
index 4f61e5c..ac6d4b2 100644
--- a/tcp_internal.h
+++ b/tcp_internal.h
@@ -88,8 +88,7 @@ void tcp_rst_do(struct ctx *c, struct tcp_tap_conn *conn);
tcp_rst_do(c, conn); \
} while (0)
-size_t tcp_l2_buf_fill_headers(const struct ctx *c,
- const struct tcp_tap_conn *conn,
+size_t tcp_l2_buf_fill_headers(const struct tcp_tap_conn *conn,
struct iovec *iov, size_t dlen,
const uint16_t *check, uint32_t seq);
int tcp_update_seqack_wnd(const struct ctx *c, struct tcp_tap_conn *conn,