summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/nft-i
Commit message (Collapse)AuthorAgeFilesLines
* libnftables: Store top_scope in struct nft_ctxPhil Sutter2019-11-071-0/+22
Allow for interactive sessions to make use of defines. Since parser is initialized for each line, top scope defines didn't persist although they are actually useful for stuff like: | # nft -i | define goodports = { 22, 23, 80, 443 } | add rule inet t c tcp dport $goodports accept | add rule inet t c tcp sport $goodports accept While being at it, introduce scope_alloc() and scope_free(). Signed-off-by: Phil Sutter <phil@nwl.cc> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>