]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: combine dormant flag with netdevice removal
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 24 Apr 2024 18:43:58 +0000 (20:43 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 25 Apr 2024 21:22:29 +0000 (23:22 +0200)
Exercise table is dormant and netdevice is gone combination.

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

diff --git a/tests/shell/testcases/chains/netdev_chain_dormant_autoremove b/tests/shell/testcases/chains/netdev_chain_dormant_autoremove
new file mode 100755 (executable)
index 0000000..0a684e5
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+set -e
+
+ip link add dummy0 type dummy
+ip link add dummy1 type dummy
+$NFT add table netdev test { flags dormant\; }
+$NFT add chain netdev test ingress { type filter hook ingress devices = { "dummy0", "dummy1" } priority 0\; policy drop\; }
+ip link del dummy0