selftests: netfilter: nft_tproxy.sh: add tcp tests
authorAntonio Ojea <aojea@google.com>
Thu, 12 Sep 2024 06:17:54 +0000 (06:17 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 26 Sep 2024 11:03:01 +0000 (13:03 +0200)
commit7e37e0eacd22c41e354e4b5d6d448b13a201954a
treed2054f5745ade9e5aea81c2955e6e92e2af18a45
parenta57856c0bbc238779e56ec9e48a7ba8e06d8bebf
selftests: netfilter: nft_tproxy.sh: add tcp tests

The TPROXY functionality is widely used, however, there are only mptcp
selftests covering this feature.

The selftests represent the most common scenarios and can also be used
as selfdocumentation of the feature.

UDP and TCP testcases are split in different files because of the
different nature of the protocols, specially due to the challenges that
present to reliable test UDP due to the connectionless nature of the
protocol. UDP only covers the scenarios involving the prerouting hook.

The UDP tests are signfinicantly slower than the TCP ones, hence they
use a larger timeout, it takes 20 seconds to run the full UDP suite
on a 48 vCPU Intel(R) Xeon(R) CPU @2.60GHz.

Signed-off-by: Antonio Ojea <aojea@google.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tools/testing/selftests/net/netfilter/Makefile
tools/testing/selftests/net/netfilter/config
tools/testing/selftests/net/netfilter/nft_tproxy_tcp.sh [new file with mode: 0755]
tools/testing/selftests/net/netfilter/nft_tproxy_udp.sh [new file with mode: 0755]