diff options
author | Máté Eckl <ecklm94@gmail.com> | 2018-08-24 17:47:17 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-08-30 12:11:45 +0200 |
commit | b4026d2515b16513fa46193172a7dce9de5a6a80 (patch) | |
tree | 471c5b1ec1d0ca18f6f7dba9c181926ae0c8464a /tests/shell/testcases/flowtable/0007prio_0 | |
parent | 34ce4e4a7bb61dbf8ce7b3d018a36ab08fb6faf3 (diff) |
test: shell: Test cases for standard prios for flowtables
Signed-off-by: Máté Eckl <ecklm94@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases/flowtable/0007prio_0')
-rwxr-xr-x | tests/shell/testcases/flowtable/0007prio_0 | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/shell/testcases/flowtable/0007prio_0 b/tests/shell/testcases/flowtable/0007prio_0 new file mode 100755 index 00000000..49bbcac7 --- /dev/null +++ b/tests/shell/testcases/flowtable/0007prio_0 @@ -0,0 +1,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 + |