blob: 5842fcb50eb2893041554a5283e503cfb8c4140c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/bash
# NFT_TEST_REQUIRES(NFT_TEST_HAVE_catchall_element)
$NFT -f /dev/stdin <<EOF
table ip test {
map testmap {
type ipv4_addr : verdict
elements = { * : jump testchain }
}
chain testchain { }
}
EOF
# second attempt to delete the catchall element
# musts trigger transaction abort
$NFT -f /dev/stdin <<EOF
delete element ip test testmap { * }
delete element ip test testmap { * }
EOF
if [ $? -eq 1 ]; then
exit 0
fi
exit 1
|