From 1407a9c45350839073842bcc8c84ce524db3a119 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 4 Feb 2022 18:45:22 +0100 Subject: tests: iptables-test: Support variant deviation Some test results are not consistent between variants: * CLUSTERIP is not supported with nft_compat, so all related tests fail with iptables-nft. * iptables-legacy mandates TCPMSS be combined with SYN flag match, iptables-nft does not care. (Or precisely, xt_TCPMSS.ko can't validate match presence.) Introduce an optional fourth test spec field to specify the variant it applies to. Consequently, the opposite result is expected with the other variant. Signed-off-by: Phil Sutter --- extensions/libipt_CLUSTERIP.t | 4 ++-- extensions/libxt_TCPMSS.t | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'extensions') diff --git a/extensions/libipt_CLUSTERIP.t b/extensions/libipt_CLUSTERIP.t index 5af555e0..30b80167 100644 --- a/extensions/libipt_CLUSTERIP.t +++ b/extensions/libipt_CLUSTERIP.t @@ -1,4 +1,4 @@ :INPUT -d 10.31.3.236/32 -i lo -j CLUSTERIP --new --hashmode sourceip --clustermac 01:AA:7B:47:F7:D7 --total-nodes 2 --local-node 0 --hash-init 1;=;FAIL --d 10.31.3.236/32 -i lo -j CLUSTERIP --new --hashmode sourceip --clustermac 01:AA:7B:47:F7:D7 --total-nodes 2 --local-node 1 --hash-init 1;=;OK --d 10.31.3.236/32 -i lo -j CLUSTERIP --new --hashmode sourceip --clustermac 01:AA:7B:47:F7:D7 --total-nodes 2 --local-node 2 --hash-init 1;=;OK +-d 10.31.3.236/32 -i lo -j CLUSTERIP --new --hashmode sourceip --clustermac 01:AA:7B:47:F7:D7 --total-nodes 2 --local-node 1 --hash-init 1;=;OK;LEGACY +-d 10.31.3.236/32 -i lo -j CLUSTERIP --new --hashmode sourceip --clustermac 01:AA:7B:47:F7:D7 --total-nodes 2 --local-node 2 --hash-init 1;=;OK;LEGACY diff --git a/extensions/libxt_TCPMSS.t b/extensions/libxt_TCPMSS.t index 553a3452..fbfbfcf8 100644 --- a/extensions/libxt_TCPMSS.t +++ b/extensions/libxt_TCPMSS.t @@ -1,6 +1,6 @@ :FORWARD,OUTPUT,POSTROUTING *mangle -j TCPMSS;;FAIL --p tcp -j TCPMSS --set-mss 42;;FAIL +-p tcp -j TCPMSS --set-mss 42;;FAIL;LEGACY -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j TCPMSS --set-mss 42;=;OK -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j TCPMSS --clamp-mss-to-pmtu;=;OK -- cgit v1.2.3