From: Pablo Neira Ayuso <pablo@netfilter.org>
To: "Pablo M. Bermudo Garay" <pablombg@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH iptables 1/2] xtables-translate: add new field to identify the caller
Date: Sat, 23 Jul 2016 13:24:09 +0200 [thread overview]
Message-ID: <20160723112409.GA13371@salvia> (raw)
In-Reply-To: <20160722154834.1802-1-pablombg@gmail.com>
On Fri, Jul 22, 2016 at 05:48:33PM +0200, Pablo M. Bermudo Garay wrote:
> In some cases, xlate functions must print a different result if they are
> invoked from nft and not from a xtables-translate command.
>
> This commit adds a new boolean field to the xt_xlate struct. This
> variable must be true when a xlate function is called from a nft
> command. Additional code is required in nft in order to obtain this
> behavior.
Why not simply pass a new parameter to ->xlate()?
This patch is anyway updating the binary interface and it makes this
less obscure as it is part of the interface.
The xlate structure hides the buffer intentionally to avoid exposing
it the the backend extensions, the comments are also stored there to
use native nf_tables comment support.
But the only reason for this approach is that you're being lazy and
you don't want to upgrade the footprint of every xlate extension ;-)
prev parent reply other threads:[~2016-07-23 11:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-22 15:48 [PATCH iptables 1/2] xtables-translate: add new field to identify the caller Pablo M. Bermudo Garay
2016-07-22 15:48 ` [PATCH iptables 2/2] xtables-translate: fix issue with quotes Pablo M. Bermudo Garay
2016-07-23 10:15 ` Pablo Neira Ayuso
2016-07-25 15:31 ` Pablo Neira Ayuso
2016-07-26 16:22 ` Pablo M. Bermudo Garay
2016-07-26 16:27 ` Pablo Neira Ayuso
2016-07-23 11:24 ` Pablo Neira Ayuso [this message]
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=20160723112409.GA13371@salvia \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablombg@gmail.com \
/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).