diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-07-18 15:26:33 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-07-19 18:32:53 +0200 |
commit | f19a8f71f9df0fb01e81af56cf30dd207958a591 (patch) | |
tree | 4c9e18beca56712e0f821ffc30761d3601694fa4 /tcp_splice.c | |
parent | 528a6517f8e23718f2a37d21b8853723a797773f (diff) | |
download | passt-f19a8f71f9df0fb01e81af56cf30dd207958a591.tar passt-f19a8f71f9df0fb01e81af56cf30dd207958a591.tar.gz passt-f19a8f71f9df0fb01e81af56cf30dd207958a591.tar.bz2 passt-f19a8f71f9df0fb01e81af56cf30dd207958a591.tar.lz passt-f19a8f71f9df0fb01e81af56cf30dd207958a591.tar.xz passt-f19a8f71f9df0fb01e81af56cf30dd207958a591.tar.zst passt-f19a8f71f9df0fb01e81af56cf30dd207958a591.zip |
tcp_splice: Eliminate SPLICE_V6 flag
Since we're now constructing socket addresses based on information in the
flowside, we no longer need an explicit flag to tell if we're dealing with
an IPv4 or IPv6 connection. Hence, drop the now unused SPLICE_V6 flag.
As well as just simplifying the code, this allows for possible future
extensions where we could splice an IPv4 connection to an IPv6 connection
or vice versa.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp_splice.c')
-rw-r--r-- | tcp_splice.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/tcp_splice.c b/tcp_splice.c index 608e7f2..c81daee 100644 --- a/tcp_splice.c +++ b/tcp_splice.c @@ -73,8 +73,6 @@ static int ns_sock_pool6 [TCP_SOCK_POOL_SIZE]; /* Pool of pre-opened pipes */ static int splice_pipe_pool [TCP_SPLICE_PIPE_POOL_SIZE][2]; -#define CONN_V6(x) ((x)->flags & SPLICE_V6) -#define CONN_V4(x) (!CONN_V6(x)) #define CONN_HAS(conn, set) (((conn)->events & (set)) == (set)) /* Display strings for connection events */ @@ -483,7 +481,6 @@ bool tcp_splice_conn_from_sock(const struct ctx *c, NULL, 0, &in6addr_loopback, dstport); conn = FLOW_SET_TYPE(flow, FLOW_TCP_SPLICE, tcp_splice); - conn->flags = af == AF_INET ? 0 : SPLICE_V6; conn->s[0] = s0; conn->s[1] = -1; conn->pipe[0][0] = conn->pipe[0][1] = -1; |