diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-07-12 00:21:49 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-07-16 17:49:39 +0200 |
commit | 3454caff67cc3641770f90e4adb2e77eede2c683 (patch) | |
tree | 8b7f29c345330edd2687a907390a95d7f83e136f /tests/shell/testcases | |
parent | bf91cfd9a619484fa3fde325ac092d69738ecf47 (diff) |
tests: shell: validate maximum chain depth
Original script from Taehee Yoo.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases')
-rwxr-xr-x | tests/shell/testcases/chains/0020depth_1 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/shell/testcases/chains/0020depth_1 b/tests/shell/testcases/chains/0020depth_1 new file mode 100755 index 00000000..fa539c8f --- /dev/null +++ b/tests/shell/testcases/chains/0020depth_1 @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +$NFT add table ip filter +$NFT add chain ip filter input { type filter hook input priority 0\; } + +for ((i=0;i<20;i++)); do + $NFT add chain ip filter a$i +done + +$NFT add rule ip filter input jump a1 + +for ((i=0;i<10;i++)); do + $NFT add rule ip filter a$i jump a$((i+1)) +done + +for ((i=11;i<19;i++)); do + $NFT add rule ip filter a$i jump a$((i+1)) +done + +$NFT add rule ip filter a10 jump a11 |