diff options
-rw-r--r-- | tests/loop-detect.1 | 8 | ||||
-rw-r--r-- | tests/loop-detect.2 | 7 | ||||
-rw-r--r-- | tests/loop-detect.3 | 7 | ||||
-rw-r--r-- | tests/loop-detect.4 | 7 |
4 files changed, 29 insertions, 0 deletions
diff --git a/tests/loop-detect.1 b/tests/loop-detect.1 new file mode 100644 index 00000000..e55864c8 --- /dev/null +++ b/tests/loop-detect.1 @@ -0,0 +1,8 @@ +#! nft -f + +# Create table and empty chains for loop detection tests +add table filter + +add chain filter chain1 +add chain filter chain2 +add chain filter chain3 diff --git a/tests/loop-detect.2 b/tests/loop-detect.2 new file mode 100644 index 00000000..88a95e0b --- /dev/null +++ b/tests/loop-detect.2 @@ -0,0 +1,7 @@ +#! nft -f + +# Circular regular jumps: chain1 -> chain2 -> chain3 -> chain1 +flush table filter +add filter chain1 jump chain2 +add filter chain2 jump chain3 +add filter chain3 jump chain1 diff --git a/tests/loop-detect.3 b/tests/loop-detect.3 new file mode 100644 index 00000000..3b83ef12 --- /dev/null +++ b/tests/loop-detect.3 @@ -0,0 +1,7 @@ +#! nft -f + +# Circular jump when creating an anonymous verdict map: chain1 -> chain2 -> chain3 -> chain1 +flush table filter +add filter chain1 jump chain2 +add filter chain2 jump chain3 +add filter chain3 ip daddr vmap { 10.0.0.1 => continue, 192.168.0.1 => jump chain1 } diff --git a/tests/loop-detect.4 b/tests/loop-detect.4 new file mode 100644 index 00000000..f6f4d572 --- /dev/null +++ b/tests/loop-detect.4 @@ -0,0 +1,7 @@ +#! nft -f + +# Circular jump with an intermediate anonymous verdict map: chain1 -> chain2 -> chain3 -> chain1 +flush table filter +add filter chain1 jump chain2 +add filter chain2 ip daddr vmap { 10.0.0.1 => continue, 192.168.0.1 => jump chain3 } +add filter chain3 jump chain1 |