From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Piyush Pangtey <gokuvsvegita@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v2] libxt_multiport: Add translation to nft
Date: Wed, 9 Mar 2016 18:30:32 +0100 [thread overview]
Message-ID: <20160309173032.GA10722@salvia> (raw)
In-Reply-To: <56E0359F.7060308@gmail.com>
On Wed, Mar 09, 2016 at 08:09:27PM +0530, Piyush Pangtey wrote:
> Added full translation for multiport.
>
> Examples :
> $ iptables-translate -A INPUT -p tcp -m multiport --ports 3:4 -j ACCEPT
> nft add rule ip filter INPUT ip protocol tcp tcp dport { 3-4 } tcp sport { 3-4 }
> counter accept
>
> $ iptables-translate -A input -p sctp -m multiport --dports 11:18 -j ACCEPT
> nft add rule ip filter input ip protocol sctp sctp dport { 11-18 } counter
> accept
>
> $ iptables-translate -A input -p dccp -m multiport --ports 11:18 -j ACCEPT
> nft add rule ip filter input ip protocol dccp dccp dport { 11-18 } dccp sport {
> 11-18 } counter accept
>
> $ ip6tables-translate -A input -p dccp -m multiport --ports 11:18 -j ACCEPT
> nft add rule ip6 filter input meta l4proto dccp dccp dport { 11-18 } dccp sport
> { 11-18 } counter accept
>
> Signed-off-by: Piyush Pangtey <gokuvsvegita@gmail.com>
> ---
> v2:
> Corrected the translations , as suggested by Arturo Borrero González
>
> extensions/libxt_multiport.c | 171 ++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 170 insertions(+), 1 deletion(-)
>
> diff --git a/extensions/libxt_multiport.c b/extensions/libxt_multiport.c
> index 03af5a9..6358ffd 100644
> --- a/extensions/libxt_multiport.c
> +++ b/extensions/libxt_multiport.c
> @@ -18,6 +18,8 @@ enum {
> F_ANY = F_SOURCE_PORTS | F_DEST_PORTS | F_SD_PORTS,
> };
>
> +static const char *xlate_proto;
I don't like this global variable trick.
Please, use the ipt_ip and ip6t_ip information instead, which is will
be now available through this patch, so we pass information as
parameter to functions.
http://patchwork.ozlabs.org/patch/595128/
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-03-09 17:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 21:21 [PATCHv3] extensions: libipt_icmp: Add translation to nft Laura Garcia Liebana
2016-03-08 10:53 ` Pablo Neira Ayuso
2016-03-09 6:58 ` [PATCH] libxt_multiport: " FaTe
2016-03-09 12:32 ` Pablo Neira Ayuso
2016-03-09 14:37 ` Piyush Pangtey
2016-03-09 14:39 ` [PATCH v2] " Piyush Pangtey
2016-03-09 17:30 ` Pablo Neira Ayuso [this message]
2016-03-10 12:50 ` [PATCH v3] " Piyush Pangtey
2016-03-10 18:31 ` Pablo Neira Ayuso
2016-03-09 7:05 ` Regarding libxt_multiport translation in nft FaTe
2016-03-09 10:06 ` Arturo Borrero Gonzalez
2016-03-09 14:34 ` Piyush Pangtey
2016-03-09 7:12 ` [PATCH] libip6t_hbh: Add translation to nft FaTe
2016-03-10 18:47 ` Pablo Neira Ayuso
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=20160309173032.GA10722@salvia \
--to=pablo@netfilter.org \
--cc=gokuvsvegita@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).