blob: 45d922eb7c14fdf25d243decb98a28197d110d41 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/bash
RULESET="add table x
add set x y { type ipv4_addr; }
add element x y { 1.1.1.1, 2.2.2.2 }
delete element x y { 1.1.1.1 }
delete element x y { 1.1.1.1 }"
$NFT -f - <<< "$RULESET" 2> /dev/null || exit 0
# Kernel must return ENOENT
echo "E: allowing double-removal of element"
exit 1
|