mirror of
https://passt.top/passt
synced 2025-05-28 04:17:20 +02:00
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>
This commit is contained in:
parent
f9fe212b1f
commit
52d45f1737
3 changed files with 17 additions and 33 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue