blob: 8dd8d9fdab0028468a2bfb4066695ae1966683a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/bash
# delete flowtable by handle
set -e
$NFT add table inet t
$NFT add flowtable inet t f { hook ingress priority filter\; devices = { lo }\; }
FH=$($NFT -a list ruleset | awk '/flowtable f/ { print $NF }')
$NFT delete flowtable inet t handle $FH
EXPECTED="table inet t {
}"
GET="$($NFT list ruleset)"
if [ "$EXPECTED" != "$GET" ] ; then
$DIFF -u <(echo "$EXPECTED") <(echo "$GET")
exit 1
fi
|