aboutgitcodebugslistschat
path: root/tcp_splice.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-11-17 16:59:03 +1100
committerStefano Brivio <sbrivio@redhat.com>2022-11-25 01:35:51 +0100
commitbb6bb5649d382ccb4cce82eb2fbc97c2708f9c0f (patch)
tree949da000bf46277877bb463863b9ae9652ef68eb /tcp_splice.c
parent034fa8a58d87ad2ea5f8b56d267d17dbc75798de (diff)
downloadpasst-bb6bb5649d382ccb4cce82eb2fbc97c2708f9c0f.tar
passt-bb6bb5649d382ccb4cce82eb2fbc97c2708f9c0f.tar.gz
passt-bb6bb5649d382ccb4cce82eb2fbc97c2708f9c0f.tar.bz2
passt-bb6bb5649d382ccb4cce82eb2fbc97c2708f9c0f.tar.lz
passt-bb6bb5649d382ccb4cce82eb2fbc97c2708f9c0f.tar.xz
passt-bb6bb5649d382ccb4cce82eb2fbc97c2708f9c0f.tar.zst
passt-bb6bb5649d382ccb4cce82eb2fbc97c2708f9c0f.zip
tcp: NAT IPv4-mapped IPv6 addresses like IPv4 addresses
passt usually doesn't NAT, but it does do so for the remapping of the gateway address to refer to the host. Currently we perform this NAT with slightly different rules on both IPv4 addresses and IPv6 addresses, but not on IPv4-mapped IPv6 addresses. This means we won't correctly handle the case of an IPv4 connection over an IPv6 socket, which is possible on Linux (and probably other platforms). Refactor tcp_conn_from_sock() to perform the NAT after converting either address family into an inany_addr, so IPv4 and and IPv4-mapped addresses have the same representation. With two new helpers this lets us remove the IPv4 and IPv6 specific paths from tcp_conn_from_sock(). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp_splice.c')
0 files changed, 0 insertions, 0 deletions