From bdc77c63d5816fd50ac5a353f6a37d9b6a410b2c Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Thu, 19 Apr 2018 18:18:57 +0200 Subject: 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 Signed-off-by: Florian Westphal --- tests/shell/testcases/sets/0033add_set_simple_flat_0 | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 tests/shell/testcases/sets/0033add_set_simple_flat_0 (limited to 'tests/shell/testcases') 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" -- cgit v1.2.3