From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [nf-next PATCH] netfilter: nft_compat: translate ebtables verdicts
Date: Thu, 29 Jan 2015 18:17:05 +0100 [thread overview]
Message-ID: <20150129171705.GB3595@salvia> (raw)
In-Reply-To: <20150129164559.23327.66398.stgit@nfdev.cica.es>
On Thu, Jan 29, 2015 at 05:45:59PM +0100, Arturo Borrero Gonzalez wrote:
> Translate ebtables verdict to the ones used by the nf_tables engine,
> so we can properly use ebtables target extensions from nft_compat.
>
> Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
> ---
> net/netfilter/nft_compat.c | 67 ++++++++++++++++++++++++++++++++++++++++----
> 1 file changed, 61 insertions(+), 6 deletions(-)
>
> diff --git a/net/netfilter/nft_compat.c b/net/netfilter/nft_compat.c
> index 7f90d06..8ac7238 100644
> --- a/net/netfilter/nft_compat.c
> +++ b/net/netfilter/nft_compat.c
> @@ -52,9 +52,8 @@ nft_compat_set_par(struct xt_action_param *par, void *xt, const void *xt_info)
> par->hotdrop = false;
> }
>
> -static void nft_target_eval(const struct nft_expr *expr,
> - struct nft_data data[NFT_REG_MAX + 1],
> - const struct nft_pktinfo *pkt)
> +static int nft_target_eval_call(const struct nft_expr *expr,
> + const struct nft_pktinfo *pkt)
Not sure it's worth the factorization, this code is rather small. I'd
suggest you just add nft_target_eval_bridge() as a copy of the
original _eval function. Rename the original nft_target_eval() to
nft_target_eval_xt().
prev parent reply other threads:[~2015-01-29 17:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-29 16:45 [nf-next PATCH] netfilter: nft_compat: translate ebtables verdicts Arturo Borrero Gonzalez
2015-01-29 17:17 ` 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=20150129171705.GB3595@salvia \
--to=pablo@netfilter.org \
--cc=arturo.borrero.glez@gmail.com \
--cc=netfilter-devel@vger.kernel.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).