summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/sets/0050set_define_1
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/sets/0050set_define_1')
-rwxr-xr-xtests/shell/testcases/sets/0050set_define_117
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/0050set_define_1 b/tests/shell/testcases/sets/0050set_define_1
new file mode 100755
index 00000000..c12de177
--- /dev/null
+++ b/tests/shell/testcases/sets/0050set_define_1
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -e
+
+EXPECTED="define BASE_ALLOWED_INCOMING_TCP_PORTS = {}
+
+table inet filter {
+ chain input {
+ type filter hook input priority 0; policy drop;
+ tcp dport {\$BASE_ALLOWED_INCOMING_TCP_PORTS} ct state new counter accept
+ }
+}
+"
+
+$NFT -f - <<< "$EXPECTED" &> /dev/null || exit 0
+echo "E: Accepted empty set" 1>&2
+exit 1