From 26b973029647daa5501dac0dcd430b0b467c3479 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Tue, 26 Jan 2021 16:42:33 +0100 Subject: src: evaluate: reset context maxlen value before prio evaluation unshare -n tests/shell/run-tests.sh tests/shell/testcases/nft-f/0024priority_0 W: [FAILED] tests/shell/testcases/nft-f/0024priority_0: got 1 /dev/stdin:8:47-49: Error: Value 100 exceeds valid range 0-15 type filter hook postrouting priority 100 Reported-by: Andreas Schultz --- tests/shell/testcases/nft-f/0024priority_0 | 14 ++++++++++++++ tests/shell/testcases/nft-f/dumps/0024priority_0.nft | 10 ++++++++++ 2 files changed, 24 insertions(+) create mode 100755 tests/shell/testcases/nft-f/0024priority_0 create mode 100644 tests/shell/testcases/nft-f/dumps/0024priority_0.nft (limited to 'tests/shell/testcases') diff --git a/tests/shell/testcases/nft-f/0024priority_0 b/tests/shell/testcases/nft-f/0024priority_0 new file mode 100755 index 00000000..586f5c3f --- /dev/null +++ b/tests/shell/testcases/nft-f/0024priority_0 @@ -0,0 +1,14 @@ +#!/bin/bash + +RULESET=" +table inet statelessnat { + chain prerouting { + type filter hook prerouting priority -100; + ip daddr set numgen inc mod 16 map { 0-7 : 10.0.1.1, 8- 15 : 10.0.1.2 } + } + chain postrouting { + type filter hook postrouting priority 100 + } +}" + +exec $NFT -f - <<< "$RULESET" diff --git a/tests/shell/testcases/nft-f/dumps/0024priority_0.nft b/tests/shell/testcases/nft-f/dumps/0024priority_0.nft new file mode 100644 index 00000000..cd7fc504 --- /dev/null +++ b/tests/shell/testcases/nft-f/dumps/0024priority_0.nft @@ -0,0 +1,10 @@ +table inet statelessnat { + chain prerouting { + type filter hook prerouting priority dstnat; policy accept; + ip daddr set numgen inc mod 16 map { 0-7 : 10.0.1.1, 8-15 : 10.0.1.2 } + } + + chain postrouting { + type filter hook postrouting priority srcnat; policy accept; + } +} -- cgit v1.2.3