summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/flowtable/0007prio_0
blob: 49bbcac7c93b95a1a4e1b15cdb7c493606c9b8a2 (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
#!/bin/bash

set -e

format_offset () {
	i=$1
	if ((i == 0))
	then
		echo ""
	elif ((i > 0))
	then
		echo "+$i"
	else
		echo "$i"
	fi
}

$NFT add table t
for offset in -11 -10 0 10 11
do
	$NFT add flowtable t f "{ hook ingress priority filter `format_offset $offset`; devices = { lo }; }"
	$NFT delete flowtable t f
done