summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/flowtable/0006segfault_0
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/flowtable/0006segfault_0')
-rwxr-xr-xtests/shell/testcases/flowtable/0006segfault_014
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/shell/testcases/flowtable/0006segfault_0 b/tests/shell/testcases/flowtable/0006segfault_0
new file mode 100755
index 00000000..de590b77
--- /dev/null
+++ b/tests/shell/testcases/flowtable/0006segfault_0
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# Make sure nft does not segfault when given invalid syntax in 'add flowtable' commands.
+
+$NFT add table ip t
+
+$NFT add flowtable ip t f { hook ingress priority 10\; devices = { lo } }
+[[ $? -eq 1 ]] || exit 1
+
+$NFT add flowtable ip t f { hook ingress\; priority 10\; }
+[[ $? -eq 1 ]] || exit 1
+
+$NFT add flowtable ip t f { hook ingress priority 10\; }
+[[ $? -eq 1 ]] || exit 1