summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-04-19 18:18:57 +0200
committerFlorian Westphal <fw@strlen.de>2018-04-19 21:17:49 +0200
commitbdc77c63d5816fd50ac5a353f6a37d9b6a410b2c (patch)
treee34ea2fe7d95c95721718cd3d39f0eebb08bb6ca /tests
parent4787edad132c30ae0f6bb00135ae5d970b0ccb74 (diff)
evaluate: clear expression context before cmd evaluation
We also need to clear expr ctx before we eval a command. This is a followup fix to 'evaluate: reset eval context when evaluating set definitions'. The first patch only fixed set evaluation when dealing with a complete table representation rather than individual commands. Reported-by: David Fabian <david.fabian@bosson.cz> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/shell/testcases/sets/0033add_set_simple_flat_09
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/0033add_set_simple_flat_0 b/tests/shell/testcases/sets/0033add_set_simple_flat_0
new file mode 100755
index 00000000..86be0c99
--- /dev/null
+++ b/tests/shell/testcases/sets/0033add_set_simple_flat_0
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+RULESET="add table ip x
+add set x setA {type ipv4_addr . inet_service . ipv4_addr; flags timeout;}
+add set x setB {type ipv4_addr . inet_service; flags timeout;}
+"
+
+set -e
+$NFT -f - <<< "$RULESET"