summaryrefslogtreecommitdiffstats
path: root/tests/shell/features/empty_netdev_chains.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/features/empty_netdev_chains.sh')
-rwxr-xr-xtests/shell/features/empty_netdev_chains.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/shell/features/empty_netdev_chains.sh b/tests/shell/features/empty_netdev_chains.sh
new file mode 100755
index 00000000..cada6956
--- /dev/null
+++ b/tests/shell/features/empty_netdev_chains.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# check if netdev chains survive without a single device
+
+unshare -n bash -c "ip link add d0 type dummy; \
+ $NFT \"table netdev t { \
+ chain c { \
+ type filter hook ingress priority 0; devices = { d0 }; \
+ }; \
+ }\"; \
+ ip link del d0; \
+ $NFT list chain netdev t c"