Allow to define variable using set reference, eg. define x = @z Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> --- tests/shell/testcases/nft-f/0022variables_0 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 tests/shell/testcases/nft-f/0022variables_0 diff --git a/tests/shell/testcases/nft-f/0022variables_0 b/tests/shell/testcases/nft-f/0022variables_0 new file mode 100755 index 000000000000..ee17a6272aa3 --- /dev/null +++ b/tests/shell/testcases/nft-f/0022variables_0 @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e + +RULESET="define test1 = @y + +table ip x { + set y { + type ipv4_addr + flags dynamic,timeout + } + + chain z { + type filter hook input priority filter; policy accept; + add \$test1 { ip saddr } + update \$test1 { ip saddr timeout 30s } + ip saddr \$test1 + } +}" + +$NFT -f - <<< "$RULESET" -- 2.11.0