From: Thomas Haller <thaller@redhat.com>
To: Phil Sutter <phil@nwl.cc>
Cc: NetFilter <netfilter-devel@vger.kernel.org>,
Pablo Neira Ayuso <pablo@netfilter.org>
Subject: Re: [nft v2 PATCH 2/3] nftables: add input flag NFT_CTX_INPUT_NO_DNS to avoid blocking getaddrinfo()
Date: Tue, 18 Jul 2023 11:12:00 +0200 [thread overview]
Message-ID: <c3c52ce4239f94ab413bfa7c25a5707112229041.camel@redhat.com> (raw)
In-Reply-To: <ZLEeZF3voEjlT12h@orbyte.nwl.cc>
On Fri, 2023-07-14 at 12:07 +0200, Phil Sutter wrote:
> On Fri, Jul 14, 2023 at 10:48:52AM +0200, Thomas Haller wrote:
> >
> > +static void parse_ctx_init(struct parse_ctx *parse_ctx, const
> > struct eval_ctx *ctx)
> > +{
> > + *parse_ctx = (struct parse_ctx) {
> > + .tbl = &ctx->nft->output.tbl,
> > + .input = &ctx->nft->input,
> > + };
> > +}
>
> This is interesting coding style, but looks more complicated than
>
> > parse_ctx->tbl = &ctx->nft->output.tbl;
> > parse_ctx->input = &ctx->nft->input;
>
> though I would just keep the extra assignment inline like so:
>
> > - struct parse_ctx parse_ctx = { .tbl = &ctx->nft-
> > >output.tbl, };
> > + struct parse_ctx parse_ctx = {
> > + .tbl = &ctx->nft->output.tbl,
> > + .input = &ctx->nft->input,
> > + };
>
> Cheers, Phil
Hi,
I will address this in an update.
Thomas
next prev parent reply other threads:[~2023-07-18 9:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 17:46 [nft PATCH] nftables: add flag for nft context to avoid blocking getaddrinfo() Thomas Haller
2023-07-10 17:58 ` Pablo Neira Ayuso
2023-07-14 8:48 ` [nft v2 PATCH 1/3] nftables: add input flags for nft_ctx Thomas Haller
2023-07-14 8:48 ` [nft v2 PATCH 2/3] nftables: add input flag NFT_CTX_INPUT_NO_DNS to avoid blocking getaddrinfo() Thomas Haller
2023-07-14 10:07 ` Phil Sutter
2023-07-18 9:12 ` Thomas Haller [this message]
2023-07-14 8:48 ` [nft v2 PATCH 3/3] py: add input_{set,get}_flags() API to helpers Thomas Haller
2023-07-14 9:59 ` Phil Sutter
2023-07-18 10:07 ` Thomas Haller
2023-07-14 10:16 ` [nft v2 PATCH 1/3] nftables: add input flags for nft_ctx Phil Sutter
2023-07-18 9:05 ` Thomas Haller
2023-07-18 9:33 ` Phil Sutter
2023-07-18 10:31 ` Thomas Haller
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=c3c52ce4239f94ab413bfa7c25a5707112229041.camel@redhat.com \
--to=thaller@redhat.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
/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).