Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | libnftables: Store top_scope in struct nft_ctx | Phil Sutter | 2019-11-07 | 1 | -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> |