From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Shivani Bhardwaj <shivanib134@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v4] extensions: libxt_mark: Add translation to nft
Date: Tue, 22 Dec 2015 17:22:19 +0100 [thread overview]
Message-ID: <20151222162219.GA13758@salvia> (raw)
In-Reply-To: <20151222161948.GA13092@salvia>
On Tue, Dec 22, 2015 at 05:19:48PM +0100, Pablo Neira Ayuso wrote:
> On Sun, Dec 20, 2015 at 08:44:12AM +0530, Shivani Bhardwaj wrote:
> > Add translation for metainformation mark to nftables.
> >
> > Examples:
> >
> > $ sudo iptables-translate -I INPUT -m mark --mark 12
> > nft insert rule ip filter INPUT mark 0xc counter
> >
> > $ sudo iptables-translate -A FORWARD -m mark --mark 22 -j ACCEPT
> > nft add rule ip filter FORWARD mark 0x16 counter accept
> >
> > $ sudo iptables-translate -t mangle -A PREROUTING -p tcp --dport 4600 -m mark --mark 0x40
> > nft add rule ip mangle PREROUTING tcp dport 4600 mark 0x40 counter
> >
> > $ sudo iptables-translate -A FORWARD -m mark --mark 0x400/0x400 -j ACCEPT
> > nft add rule ip filter FORWARD mark and 0x400 == 0x400 counter accept
>
> Applied with minor glitch I have fixed here.
I noticed another problem.
This translation doesn't look OK.
# iptables-translate -I INPUT -p tcp -m mark ! --mark 0xa/0xa
nft insert rule ip filter INPUT ip protocol tcp mark != and 0xa == 0xa counter
No problem, please just send me a follow up patch to fix this and make
sure you test all possible code branches next time.
Thanks.
prev parent reply other threads:[~2015-12-22 16:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-20 3:14 [PATCH v4] extensions: libxt_mark: Add translation to nft Shivani Bhardwaj
2015-12-22 16:19 ` Pablo Neira Ayuso
2015-12-22 16:22 ` 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=20151222162219.GA13758@salvia \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=shivanib134@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).