blob: 1e674d3dc12b49ee2892c41483eb4ac582648d9b (
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 "{ type filter hook input priority 0; }"
$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
|