blob: 920032f28621d75e866a0845f7ea4f50eebabcc7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/bash
# test rule adding with invalid position/handle/index value
RULESET="flush ruleset
table ip t {
chain c {
accept
accept
}
}"
$NFT -f - <<< "$RULESET"
for cmd in add insert; do
for keyword in position handle index; do
$NFT $cmd rule t c $keyword 5 drop 2>/dev/null || continue
echo "E: invalid $keyword value allowed in $cmd command" >&2
exit 1
done
done
exit 0
|