[PATCHv3] extensions: libip6t_icmp6: Add translation to nft

2016-03-07 Thread Laura Garcia Liebana
Add translation for icmpv6 to nftables. Not supported types in nftables are: no-route, communication-prohibited, beyond-scope, address-unreachable, port-unreachable, failed-policy, reject-route, ttl-zero-during-transit, ttl-zero-during-reassembly, bad-header, unknown-header-type and unknown-option.

[PATCHv3] extensions: libipt_icmp: Add translation to nft

2016-03-07 Thread Laura Garcia Liebana
Add translation for icmp to nftables. Not supported types in nftables are: any, network-unreachable, host-unreachable, protocol-unreachable, port-unreachable, fragmentation-needed, source-route-failed, network-unknown, host-unknown, network-prohibited, host-prohibited, TOS-network-unreachable, TOS-

Re: [PATCHv2] extensions: libipt_icmp: Add translation to nft

2016-03-07 Thread Laura Garcia
On Mon, Mar 07, 2016 at 07:20:54PM +0100, Pablo Neira Ayuso wrote: > > I think you can add these two to icmp_type_tbl in nft/src/proto.c, it > would be just a two-liner to support ICMP_ROUTERADVERT and > ICMP_ROUTERSOLICIT. > Ok, thanks! -- To unsubscribe from this list: send the line "unsubscr

Re: [PATCHv2] extensions: libipt_icmp: Add translation to nft

2016-03-07 Thread Pablo Neira Ayuso
On Mon, Mar 07, 2016 at 11:40:08PM +0530, Shivani Bhardwaj wrote: > On Mon, Mar 7, 2016 at 11:34 PM, Laura Garcia wrote: > > On Mon, Mar 07, 2016 at 06:14:08PM +0100, Pablo Neira Ayuso wrote: > >> On Sun, Mar 06, 2016 at 11:24:44PM +0100, Laura Garcia Liebana wrote: > > The brackets are not missin

Re: [PATCHv2] extensions: libip6t_icmp6: Add translation to nft

2016-03-07 Thread Pablo Neira Ayuso
On Mon, Mar 07, 2016 at 07:08:51PM +0100, Laura Garcia wrote: > On Mon, Mar 07, 2016 at 06:11:19PM +0100, Pablo Neira Ayuso wrote: > > > > #define XT_ICMPV6_TYPE(type)(ND_ROUTER_SOLICIT - type) > > > > static const char *icmp6_type_xlate_array[] = { > > [XT_ICMPV6_TYPE(ND_ROUTER_SOLIC

Re: [PATCHv2] extensions: libipt_icmp: Add translation to nft

2016-03-07 Thread Pablo Neira Ayuso
On Mon, Mar 07, 2016 at 07:04:46PM +0100, Laura Garcia wrote: > On Mon, Mar 07, 2016 at 06:14:08PM +0100, Pablo Neira Ayuso wrote: > > On Sun, Mar 06, 2016 at 11:24:44PM +0100, Laura Garcia Liebana wrote: > > > Add translation for icmp to nftables. Not supported types in nftables > > > are: any, ne

Re: [PATCHv2] extensions: libipt_icmp: Add translation to nft

2016-03-07 Thread Shivani Bhardwaj
On Mon, Mar 7, 2016 at 11:34 PM, Laura Garcia wrote: > On Mon, Mar 07, 2016 at 06:14:08PM +0100, Pablo Neira Ayuso wrote: >> On Sun, Mar 06, 2016 at 11:24:44PM +0100, Laura Garcia Liebana wrote: >> > Add translation for icmp to nftables. Not supported types in nftables >> > are: any, network-unrea

Re: [PATCHv2] extensions: libip6t_icmp6: Add translation to nft

2016-03-07 Thread Laura Garcia
On Mon, Mar 07, 2016 at 06:11:19PM +0100, Pablo Neira Ayuso wrote: > On Sun, Mar 06, 2016 at 11:23:10PM +0100, Laura Garcia Liebana wrote: > > Add translation for icmpv6 to nftables. Not supported types in nftables > > are: no-route, communication-prohibited, beyond-scope, > > address-unreachable,

Re: [PATCH] configure: Show support for connlabel

2016-03-07 Thread Shivani Bhardwaj
On Mon, Mar 7, 2016 at 11:30 PM, Pablo Neira Ayuso wrote: > On Mon, Mar 07, 2016 at 06:56:46PM +0100, Pablo Neira Ayuso wrote: >> On Mon, Mar 07, 2016 at 11:05:15PM +0530, Shivani Bhardwaj wrote: >> > Yes, I'll do that. >> > I need a bit of help here. >> > I followed some other modules for which s

Re: [PATCH] doc: nft: Fixed a typo and added/changed punctuation

2016-03-07 Thread Pablo Neira Ayuso
On Mon, Mar 07, 2016 at 08:24:20PM +0530, Piyush Pangtey wrote: > Instead of using '/' longopts , use ',' ,as followed by man pages of other > programs. > > Signed-off-by: Piyush Pangtey > --- > doc/nft.xml | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff

Re: [PATCHv2] extensions: libipt_icmp: Add translation to nft

2016-03-07 Thread Laura Garcia
On Mon, Mar 07, 2016 at 06:14:08PM +0100, Pablo Neira Ayuso wrote: > On Sun, Mar 06, 2016 at 11:24:44PM +0100, Laura Garcia Liebana wrote: > > Add translation for icmp to nftables. Not supported types in nftables > > are: any, network-unreachable, host-unreachable, protocol-unreachable, > > port-un

Re: [PATCH] extensions: libip6t_rt.c: Add translation to nft

2016-03-07 Thread Pablo Neira Ayuso
On Sun, Mar 06, 2016 at 10:26:57AM -0500, Janani Ravichandran wrote: > Add translation for rt for options --rt-type, --rt-segsleft and --rt-len. > > Examples: > > $ sudo ip6tables-translate -A INPUT -m rt --rt-type 0 -j DROP > nft add rule ip6 filter INPUT rt type 0 counter drop > > $ sudo ip6ta

Re: [PATCH] configure: Show support for connlabel

2016-03-07 Thread Pablo Neira Ayuso
On Mon, Mar 07, 2016 at 06:56:46PM +0100, Pablo Neira Ayuso wrote: > On Mon, Mar 07, 2016 at 11:05:15PM +0530, Shivani Bhardwaj wrote: > > Yes, I'll do that. > > I need a bit of help here. > > I followed some other modules for which support has been mentioned. > > For example, libipq > > When I fir

Re: [PATCH] configure: Show support for connlabel

2016-03-07 Thread Pablo Neira Ayuso
On Mon, Mar 07, 2016 at 11:05:15PM +0530, Shivani Bhardwaj wrote: > On Mon, Mar 7, 2016 at 7:39 PM, Pablo Neira Ayuso wrote: > > On Mon, Mar 07, 2016 at 02:44:47PM +0530, Shivani Bhardwaj wrote: > >> Add the --enable-connlabel option and show whether it is already > >> supported. > >> > >> After t

Re: [BUG] kernel crash in br_netfilter

2016-03-07 Thread Zefir Kurtisi
On 02/29/2016 01:33 PM, Zefir Kurtisi wrote: > I've been fighting a kernel bug that is producing random crashes around > network / > skb_layer for a long time and was able to isolate it (or one of its > components) to > the br_netfilter module. > > I am reproducing the bug with PowerPC (TL-WDR49

Re: [PATCH] configure: Show support for connlabel

2016-03-07 Thread Shivani Bhardwaj
On Mon, Mar 7, 2016 at 7:39 PM, Pablo Neira Ayuso wrote: > On Mon, Mar 07, 2016 at 02:44:47PM +0530, Shivani Bhardwaj wrote: >> Add the --enable-connlabel option and show whether it is already >> supported. >> >> After this patch, iptables configuration shows up as: >> >> Iptables Configuration: >

Re: [PATCHv2] extensions: libipt_icmp: Add translation to nft

2016-03-07 Thread Pablo Neira Ayuso
On Sun, Mar 06, 2016 at 11:24:44PM +0100, Laura Garcia Liebana wrote: > Add translation for icmp to nftables. Not supported types in nftables > are: any, network-unreachable, host-unreachable, protocol-unreachable, > port-unreachable, fragmentation-needed, source-route-failed, > network-unknown, ho

[PATCH 4/4 v3] nftables: rule: Change the field "rule->comment" for an nftnl_udata_buf MIME-Version: 1.0

2016-03-07 Thread Carlos Falgueras García
Now it is possible to store multiple variable length user data into rule. Modify the parser in order to fill the nftnl_udata with the comment, and the print function for extract these commentary and print it to user. Signed-off-by: Carlos Falgueras García --- include/rule.h| 11 +

[PATCH 3/4] libnftnl: test: Actualize test to check new nftnl_udata features of nftnl_rule

2016-03-07 Thread Carlos Falgueras García
Modify nft-rule-test.c to check TLV attribute inclusion in nftnl_rule. Add "*-rule-udata.[json|xml]" to check parsers. Signed-off-by: Carlos Falgueras García --- tests/jsonfiles/71-rule-udata.json | 1 + tests/nft-rule-test.c | 21 + tests/xmlfiles/82-rule-udata

[PATCH 2/4 v3] libnftnl: rule: Change the "userdata" attribute to use new TLV buffer

2016-03-07 Thread Carlos Falgueras García
Now is it possible to store multiple variable length user data into a rule. Modify XML and JSON parsers to support this new feature. Signed-off-by: Carlos Falgueras García --- include/json.h | 7 ++ include/utils.h | 2 + include/xml.h | 5 ++ src/jansson.c | 41 + src/mxml.c

[PATCH 1/4 v3] libnftnl: Implement new buffer of TLV objects

2016-03-07 Thread Carlos Falgueras García
These functions allow to create a buffer (nftnl_udata_buf) of TLV objects (nftnl_udata). It is inspired by libmnl/src/attr.c. It can be used to store several variable length user data into an object. Example usage: ``` struct nftnl_udata_buf *buf; struct nftnl_udata *attr;

Re: [PATCHv2] extensions: libip6t_icmp6: Add translation to nft

2016-03-07 Thread Pablo Neira Ayuso
On Sun, Mar 06, 2016 at 11:23:10PM +0100, Laura Garcia Liebana wrote: > Add translation for icmpv6 to nftables. Not supported types in nftables > are: no-route, communication-prohibited, beyond-scope, > address-unreachable, port-unreachable, failed-policy, reject-route, > ttl-zero-during-transit, t

Re: [PATCHv2] extensions: libipt_icmp: Add translation to nft

2016-03-07 Thread Pablo Neira Ayuso
On Sun, Mar 06, 2016 at 11:24:44PM +0100, Laura Garcia Liebana wrote: > Add translation for icmp to nftables. Not supported types in nftables > are: any, network-unreachable, host-unreachable, protocol-unreachable, > port-unreachable, fragmentation-needed, source-route-failed, > network-unknown, ho

Re: [PATCH v3] extensions: libxt_dccp: Add translation to nft

2016-03-07 Thread Pablo Neira Ayuso
On Mon, Mar 07, 2016 at 10:13:51PM +0530, Shivani Bhardwaj wrote: > On Mon, Mar 7, 2016 at 8:09 PM, Pablo Neira Ayuso wrote: > > On Fri, Mar 04, 2016 at 03:31:45AM +0530, Shivani Bhardwaj wrote: > >> Add translation for dccp to nftables. > >> > >> Full translation of this match awaits the support

Re: [PATCH v3] extensions: libxt_dccp: Add translation to nft

2016-03-07 Thread Shivani Bhardwaj
On Mon, Mar 7, 2016 at 8:09 PM, Pablo Neira Ayuso wrote: > On Fri, Mar 04, 2016 at 03:31:45AM +0530, Shivani Bhardwaj wrote: >> Add translation for dccp to nftables. >> >> Full translation of this match awaits the support for --dccp-option. >> >> Examples: >> >> $ sudo iptables-translate -A INPUT

[PATCH] doc: nft: Fixed a typo and added/changed punctuation

2016-03-07 Thread Piyush Pangtey
Instead of using '/' longopts , use ',' ,as followed by man pages of other programs. Signed-off-by: Piyush Pangtey --- doc/nft.xml | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/nft.xml b/doc/nft.xml index 7cc9988..eab97f5 100644 --- a/doc/nft.xml

Re: [PATCH v3] extensions: libxt_dccp: Add translation to nft

2016-03-07 Thread Pablo Neira Ayuso
On Fri, Mar 04, 2016 at 03:31:45AM +0530, Shivani Bhardwaj wrote: > Add translation for dccp to nftables. > > Full translation of this match awaits the support for --dccp-option. > > Examples: > > $ sudo iptables-translate -A INPUT -p dccp -m dccp --sport 100 > nft add rule ip filter INPUT dccp

Re: [PATCH] extensions: libipt_icmp: Add translation to nft

2016-03-07 Thread Pablo Neira Ayuso
On Sat, Mar 05, 2016 at 09:00:41PM +0100, Laura Garcia Liebana wrote: > Add translation for icmp to nftables. > > Examples: > > $ sudo iptables-translate -t filter -A INPUT -m icmp --icmp-type any -j LOG > nft add rule ip filter INPUT icmp type any counter log level warn > > $ sudo iptables-tran

Re: [PATCH] configure: Show support for connlabel

2016-03-07 Thread Pablo Neira Ayuso
On Mon, Mar 07, 2016 at 02:44:47PM +0530, Shivani Bhardwaj wrote: > Add the --enable-connlabel option and show whether it is already > supported. > > After this patch, iptables configuration shows up as: > > Iptables Configuration: > IPv4 support: yes > IPv6 supp

Re: [PATCH] extensions: libxt_connlabel: Add translation to nft

2016-03-07 Thread Shivani Bhardwaj
On Mon, Mar 7, 2016 at 7:02 PM, Pablo Neira Ayuso wrote: > On Mon, Mar 07, 2016 at 06:55:31PM +0530, Shivani Bhardwaj wrote: >> On Mon, Mar 7, 2016 at 6:35 PM, Pablo Neira Ayuso >> wrote: >> > On Sun, Mar 06, 2016 at 01:07:03AM +0100, Florian Westphal wrote: >> >> Shivani Bhardwaj wrote: >> >>

Re: [PATCH] extensions: libxt_connlabel: Add translation to nft

2016-03-07 Thread Pablo Neira Ayuso
On Mon, Mar 07, 2016 at 02:30:04PM +0100, Florian Westphal wrote: > Shivani Bhardwaj wrote: > > On Mon, Mar 7, 2016 at 6:35 PM, Pablo Neira Ayuso > > wrote: > > > On Sun, Mar 06, 2016 at 01:07:03AM +0100, Florian Westphal wrote: > > >> Shivani Bhardwaj wrote: > > >> > Add translation for connla

Re: [PATCH] extensions: libxt_connlabel: Add translation to nft

2016-03-07 Thread Pablo Neira Ayuso
On Mon, Mar 07, 2016 at 06:55:31PM +0530, Shivani Bhardwaj wrote: > On Mon, Mar 7, 2016 at 6:35 PM, Pablo Neira Ayuso wrote: > > On Sun, Mar 06, 2016 at 01:07:03AM +0100, Florian Westphal wrote: > >> Shivani Bhardwaj wrote: > >> > Add translation for connlabel to nftables. > >> > Full translation

Re: [PATCH] extensions: libxt_connlabel: Add translation to nft

2016-03-07 Thread Florian Westphal
Shivani Bhardwaj wrote: > On Mon, Mar 7, 2016 at 6:35 PM, Pablo Neira Ayuso wrote: > > On Sun, Mar 06, 2016 at 01:07:03AM +0100, Florian Westphal wrote: > >> Shivani Bhardwaj wrote: > >> > Add translation for connlabel to nftables. > >> > Full translation for this match awaits the support for --

Re: [PATCH] extensions: libxt_connlabel: Add translation to nft

2016-03-07 Thread Shivani Bhardwaj
On Mon, Mar 7, 2016 at 6:35 PM, Pablo Neira Ayuso wrote: > On Sun, Mar 06, 2016 at 01:07:03AM +0100, Florian Westphal wrote: >> Shivani Bhardwaj wrote: >> > Add translation for connlabel to nftables. >> > Full translation for this match awaits the support for --set option. >> >> Hmm, I sent patch

Re: Seeking help for implementing CT HELPER in nftables

2016-03-07 Thread Patrick McHardy
On 05.03, christophe leroy wrote: > Hello, > > I'm trying to implement support for CT HELPERs in linux kernel for > nftables and need some help/guidance. > > The rule beeing 'udp dport tftp ct helper set "tftp"', I get > nft_ct_set_init() called when I add the rule in the table output filter > ta

Re: [PATCH] extensions: libxt_connlabel: Add translation to nft

2016-03-07 Thread Pablo Neira Ayuso
On Sun, Mar 06, 2016 at 01:07:03AM +0100, Florian Westphal wrote: > Shivani Bhardwaj wrote: > > Add translation for connlabel to nftables. > > Full translation for this match awaits the support for --set option. > > Hmm, I sent patches for that a while ago, don't know why they were > not applied.

[PATCH 1/2 nft] parser: remove 'reset' as reserve keyword

2016-03-07 Thread Pablo Neira Ayuso
The 'reset' keyword can be used as dccp type, so don't qualify it as reserve keyword to avoid a conflict with this. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1055 Reported-by: Shivani Bhardwaj Signed-off-by: Pablo Neira Ayuso --- src/parser_bison.y | 11 --- src/scanner.l

[PATCH 2/2 nft] tests/py: enable tests for dccp types

2016-03-07 Thread Pablo Neira Ayuso
This patch make sure we test dccp type. Signed-off-by: Pablo Neira Ayuso --- tests/py/inet/dccp.t| 7 +++ tests/py/inet/dccp.t.payload.inet | 27 +++ tests/py/inet/dccp.t.payload.ip | 27 +++ tests/py/inet/dccp.t.payload.

Re: [PATCH libnftnl] trace: fix multiple copy and paste errors

2016-03-07 Thread Florian Westphal
Patrick McHardy wrote: > Fix duplicated and incorrect assignments. Ugh, my bad. Thanks for fixing this up! -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-

[PATCH libnftnl] trace: fix multiple copy and paste errors

2016-03-07 Thread Patrick McHardy
Fix duplicated and incorrect assignments. Signed-off-by: Patrick McHardy --- src/trace.c | 51 +-- 1 file changed, 13 insertions(+), 38 deletions(-) diff --git a/src/trace.c b/src/trace.c index b04abb5..9655f0a 100644 --- a/src/trace.c +++ b/src/t

[PATCH] configure: Show support for connlabel

2016-03-07 Thread Shivani Bhardwaj
Add the --enable-connlabel option and show whether it is already supported. After this patch, iptables configuration shows up as: Iptables Configuration: IPv4 support: yes IPv6 support: yes Devel support:yes IPQ suppo