summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/chains/0018check_jump_loop_1
blob: b87520f287d781742f49fa9ad0051358ccd7b7ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

set -e

$NFT add table ip filter
$NFT add chain ip filter ap1
$NFT add chain ip filter ap2
$NFT add rule ip filter ap1 jump ap2

# kernel should return EOPNOTSUPP
$NFT add rule ip filter ap1 jump ap1 2>/dev/null >&2 || exit 0
echo "E: Accepted jump-to-self"
exit 1