Check that we can't jump to input hook from output. Signed-off-by: Florian Westphal <fw@xxxxxxxxx> --- .../shell/testcases/chains/jump_to_base_chain | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 tests/shell/testcases/chains/jump_to_base_chain diff --git a/tests/shell/testcases/chains/jump_to_base_chain b/tests/shell/testcases/chains/jump_to_base_chain new file mode 100755 index 000000000000..d71da4cf35eb --- /dev/null +++ b/tests/shell/testcases/chains/jump_to_base_chain @@ -0,0 +1,25 @@ +#!/bin/bash + +$NFT -f - <<EOF +table t { + chain i { + type filter hook input priority 0 + } + + chain o { + type filter hook output priority 0 + jump c + } + + chain c { + jump i + } +} +EOF + +if [ $? -eq 0 ];then + echo "E: Accepted jump to a base chain" + exit 1 +fi + +exit 0 -- 2.44.2