selftests: netfilter: nft_tproxy.sh: add tcp tests
Subsystems (3)
PATCH v3 1/1 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.
---
Changelog since v2:
- enable tproxy networking selftests
Changelog since v1:
- indentantion fixes, replace spaces by tabs
- add UDP tests spliting each transport protocol in its own file
.../testing/selftests/net/netfilter/Makefile | 2 + tools/testing/selftests/net/netfilter/config | 1 + .../selftests/net/netfilter/nft_tproxy_tcp.sh | 358 ++++++++++++++++++ .../selftests/net/netfilter/nft_tproxy_udp.sh | 262 +++++++++++++ 4 files changed, 623 insertions(+) create mode 100755 tools/testing/selftests/net/netfilter/nft_tproxy_tcp.sh create mode 100755 tools/testing/selftests/net/netfilter/nft_tproxy_udp.sh
tools/testing/selftests/net/netfilter/Makefile +2 -0
@@ -26,6 +26,8 @@ TEST_PROGS += nft_nat.sh TEST_PROGS += nft_nat_zones.sh TEST_PROGS += nft_queue.sh TEST_PROGS += nft_synproxy.sh +TEST_PROGS += nft_tproxy_tcp.sh +TEST_PROGS += nft_tproxy_udp.sh TEST_PROGS += nft_zones_many.sh TEST_PROGS += rpath.sh TEST_PROGS += xt_string.sh
tools/testing/selftests/net/netfilter/config +1 -0
@@ -81,6 +81,7 @@ CONFIG_NFT_QUEUE=m CONFIG_NFT_QUOTA=m CONFIG_NFT_REDIR=m CONFIG_NFT_SYNPROXY=m +CONFIG_NFT_TPROXY=m CONFIG_VETH=m CONFIG_VLAN_8021Q=m CONFIG_XFRM_USER=m
tools/testing/selftests/net/netfilter/nft_tproxy_tcp.sh new file +358 -0
358 lines not on this page · raw message
tools/testing/selftests/net/netfilter/nft_tproxy_udp.sh new file +262 -0
262 lines not on this page · raw message
Signature · 1 line
2.46.0.598.g6f2099f65c-goog