From 575cc4519aa177c573481f683e07c2789a2f870a Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 2 Jun 2015 17:14:59 +0200 Subject: tests: regression: fix NAT tests snat can be only used from prerouting and input, and dnat from output and postrouting. ip/nat.t: ERROR: line 12: nft add rule ip test-ip4 output iifname eth0 tcp sport 23-34 snat 192.168.3.2: This rule should not have failed. Split the test file as they require different chain configuration. Signed-off-by: Pablo Neira Ayuso --- tests/regression/ip/dnat.t | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/regression/ip/dnat.t (limited to 'tests/regression/ip/dnat.t') diff --git a/tests/regression/ip/dnat.t b/tests/regression/ip/dnat.t new file mode 100644 index 00000000..78fc454d --- /dev/null +++ b/tests/regression/ip/dnat.t @@ -0,0 +1,12 @@ +*ip;test-ip4 +:prerouting;type nat hook prerouting priority 0 + +iifname "eth0" tcp dport 80-90 dnat 192.168.3.2;ok +iifname "eth0" tcp dport != 80-90 dnat 192.168.3.2;ok +iifname "eth0" tcp dport {80, 90, 23} dnat 192.168.3.2;ok +- iifname "eth0" tcp dport != {80, 90, 23} dnat 192.168.3.2;ok +- iifname "eth0" tcp dport != {80, 90, 23} dnat 192.168.3.2;ok +# BUG: invalid expression type set +# nft: src/evaluate.c:975: expr_evaluate_relational: Assertion '0' failed. + +iifname "eth0" tcp dport != 23-34 dnat 192.168.3.2;ok -- cgit v1.2.3