]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: delete flowtable after flushing chain
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 3 Jan 2020 16:46:24 +0000 (17:46 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 5 Jan 2020 15:12:30 +0000 (16:12 +0100)
This patch adds a test to cover delete flowtable after chain flush
including two rule references to the flowtable.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/shell/testcases/flowtable/0011deleteafterflush_0 [new file with mode: 0755]

diff --git a/tests/shell/testcases/flowtable/0011deleteafterflush_0 b/tests/shell/testcases/flowtable/0011deleteafterflush_0
new file mode 100755 (executable)
index 0000000..4f519a7
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -e
+$NFT add table x
+$NFT add chain x y
+$NFT add flowtable x f { hook ingress priority 0\; devices = { lo }\;}
+$NFT add rule x y ip protocol tcp flow add @f
+$NFT add rule x y ip protocol udp flow add @f
+$NFT flush chain x y
+$NFT delete flowtable x f