On Wed, Nov 06, 2019 at 03:22:32PM +0100, Phil Sutter wrote: > On Wed, Nov 06, 2019 at 03:00:01PM +0100, Phil Sutter wrote: > > 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@xxxxxx> > > --- > > Changes since v1: > > - Fix usage example in commit message. > > - Add scope_{alloc,free} functions. > > Minor correction, this is actually v3 and above are the changes since > v2. /o\ For this v3. Acked-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>