The '$' has to be escaped, else it gets replaced with an empty
value by the shell. As 'set -e' is used, that caused the first
nft command to fail.
Signed-off-by: Florian Westphal <fw@strlen.de>
chain y {
define unused = 4.4.4.4
define address = { 1.1.1.1, 2.2.2.2 }
- ip saddr $address
+ ip saddr \$address
redefine address = { 3.3.3.3 }
- ip saddr $address
+ ip saddr \$address
undefine unused
}
}"
EXPECTED="table ip x {
- chain y {
- ip saddr { 1.1.1.1, 2.2.2.2 }
- ip saddr { 3.3.3.3 }
- }
+ chain y {
+ ip saddr { 1.1.1.1, 2.2.2.2 }
+ ip saddr { 3.3.3.3 }
+ }
}"
$NFT -f - <<< "$RULESET"