From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [nft PATCH v2] libnftables: Store top_scope in struct nft_ctx
Date: Wed, 6 Nov 2019 15:22:32 +0100 [thread overview]
Message-ID: <20191106142232.GS15063@orbyte.nwl.cc> (raw)
In-Reply-To: <20191106140001.2539-1-phil@nwl.cc>
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@nwl.cc>
> ---
> 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\
Sorry for the mess,
Phil
next prev parent reply other threads:[~2019-11-06 14:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-06 14:00 [nft PATCH v2] libnftables: Store top_scope in struct nft_ctx Phil Sutter
2019-11-06 14:22 ` Phil Sutter [this message]
2019-11-07 9:41 ` Pablo Neira Ayuso
-- strict thread matches above, loose matches on Subject: below --
2019-10-30 21:28 Phil Sutter
2019-11-06 12:40 ` Pablo Neira Ayuso
2019-11-06 14:00 ` Phil Sutter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191106142232.GS15063@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).