diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-07-18 15:26:43 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-07-19 18:33:29 +0200 |
commit | 060f24e310b71f8813dbbc561a2e5a59d21feae0 (patch) | |
tree | 0b2d8532c057f97ec5f51840c1a4daeb12f79f23 /icmp.c | |
parent | 4cd753e65c591732b84c455b8eb9af44d09155cd (diff) | |
download | passt-060f24e310b71f8813dbbc561a2e5a59d21feae0.tar passt-060f24e310b71f8813dbbc561a2e5a59d21feae0.tar.gz passt-060f24e310b71f8813dbbc561a2e5a59d21feae0.tar.bz2 passt-060f24e310b71f8813dbbc561a2e5a59d21feae0.tar.lz passt-060f24e310b71f8813dbbc561a2e5a59d21feae0.tar.xz passt-060f24e310b71f8813dbbc561a2e5a59d21feae0.tar.zst passt-060f24e310b71f8813dbbc561a2e5a59d21feae0.zip |
flow, tcp: Flow based NAT and port forwarding for TCP
Currently the code to translate host side addresses and ports to guest side
addresses and ports, and vice versa, is scattered across the TCP code.
This includes both port redirection as controlled by the -t and -T options,
and our special case NAT controlled by the --no-map-gw option.
Gather this logic into fwd_nat_from_*() functions for each input
interface in fwd.c which take protocol and address information for the
initiating side and generates the pif and address information for the
forwarded side. This performs any NAT or port forwarding needed.
We create a flow_target() helper which applies those forwarding functions
as needed to automatically move a flow from INI to TGT state.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'icmp.c')
0 files changed, 0 insertions, 0 deletions