tests/shell/testcases/chains/0011endless_jump_loop_1
raw| 1 | #!/bin/bash |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | $NFT add table t |
| 6 | $NFT add chain "t c1 { type filter hook forward priority 0; }" |
| 7 | $NFT add chain t c2 |
| 8 | $NFT add map t m {type inet_service : verdict \;} |
| 9 | $NFT add element t m {2 : jump c2} |
| 10 | $NFT add rule t c1 tcp dport vmap @m |
| 11 | |
| 12 | # kernel should return ELOOP |
| 13 | $NFT add element t m {1 : jump c1} 2>/dev/null || exit 0 |
| 14 | echo "E: accepted endless jump loop in a vmap" >&2 |
| 15 | exit 1 |