Re: [PATCH v4] extensions: libxt_mark: Add translation to nft

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux