aboutgitcodebugslistschat
path: root/tcp.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-09-24 19:08:19 +1000
committerStefano Brivio <sbrivio@redhat.com>2022-09-24 14:48:35 +0200
commitf5a31ee94c37f92729d458335705f5befa168151 (patch)
tree6710d5df183469d10d69c71e1d13ee04f01ba6ae /tcp.c
parent1467a35b5af93a5f7c6678e1c6a8d9b4c191160c (diff)
downloadpasst-f5a31ee94c37f92729d458335705f5befa168151.tar
passt-f5a31ee94c37f92729d458335705f5befa168151.tar.gz
passt-f5a31ee94c37f92729d458335705f5befa168151.tar.bz2
passt-f5a31ee94c37f92729d458335705f5befa168151.tar.lz
passt-f5a31ee94c37f92729d458335705f5befa168151.tar.xz
passt-f5a31ee94c37f92729d458335705f5befa168151.tar.zst
passt-f5a31ee94c37f92729d458335705f5befa168151.zip
Don't use indirect remap functions for conf_ports()
Now that we've delayed initialization of the UDP specific "reverse" map until udp_init(), the only difference between the various 'remap' functions used in conf_ports() is which array they target. So, simplify by open coding the logic into conf_ports() with a pointer to the correct mapping array. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tcp.c')
-rw-r--r--tcp.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/tcp.c b/tcp.c
index e44177f..509a0b3 100644
--- a/tcp.c
+++ b/tcp.c
@@ -949,28 +949,6 @@ static void conn_event_do(const struct ctx *c, struct tcp_conn *conn,
} while (0)
/**
- * tcp_remap_to_tap() - Set delta for port translation toward guest/tap
- * @c: Execution context
- * @port: Original destination port, host order
- * @delta: Delta to be added to original destination port
- */
-void tcp_remap_to_tap(struct ctx *c, in_port_t port, in_port_t delta)
-{
- c->tcp.fwd_in.delta[port] = delta;
-}
-
-/**
- * tcp_remap_to_tap() - Set delta for port translation toward init namespace
- * @c: Execution context
- * @port: Original destination port, host order
- * @delta: Delta to be added to original destination port
- */
-void tcp_remap_to_init(struct ctx *c, in_port_t port, in_port_t delta)
-{
- c->tcp.fwd_out.delta[port] = delta;
-}
-
-/**
* tcp_rtt_dst_low() - Check if low RTT was seen for connection endpoint
* @conn: Connection pointer
*