[PATCH RFC nf-next 0/3] named expressions for nf_tables

2016-04-06 Thread Pablo Neira Ayuso
Hi, This patchset introduces the named stateful expressions for nf_tables, that allows userspace to set a name for the stateful expression for several reasons: * Provide a unique identifier to fetch and reset it internal state. * Allow to update of their parameters and internal state. * Allow

[PATCH RFC nf-next 2/3] netfilter: nf_tables: support for named expression reference

2016-04-06 Thread Pablo Neira Ayuso
This patch adds the 'nexpr' expression, this expression allows us to refer to existing named expressions. This generic expression can be used from rules and set elements. This patch also adds nft_nexpr_lookup() to the core, as this new expression requires this function. Signed-off-by: Pablo Neira

[PATCH RFC nf-next 3/3] netfilter: nf_tables: support dump and reset for named expressions

2016-04-06 Thread Pablo Neira Ayuso
This patch adds a new NFT_MSG_GETNEXPR_RESET command to dump and to atomically reset the internal state of the named expression. Stateful expressions may implement the new reset() interface to allow the reset of this named expressions. This patch comes with the first client of it: the nft_counter

[PATCH RFC nf-next 1/3] netfilter: nf_tables: add stateful named expressions

2016-04-06 Thread Pablo Neira Ayuso
Users can define named counters in iptables through the nfacct infrastructure. This extended accounting infrastructure provides a netlink interface to create counters, that are uniquely identified by a name, to fetch them from userspace; and to (atomically) fetch and reset them. In nf_tables, the

Re: [iptables PATCH] extensions/libxt_tcp: fix nftables translate flags value, 'none' vs '0x0'

2016-04-06 Thread Vadim A. Misbakh-Soloviov
Tested-by: Vadim A. Misbakh-Soloviov -- // now it generates valid nftables rule signature.asc Description: This is a digitally signed message part.

[iptables PATCH] extensions/libxt_tcp: fix nftables translate flags value, 'none' vs '0x0'

2016-04-06 Thread Arturo Borrero Gonzalez
The iptables command: -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE should translate to: tcp flags & fin|syn|rst|psh|ack|urg == 0x0 instead of: tcp flags & fin|syn|rst|psh|ack|urg == none Reported-by: Vadim A. Misbakh-Soloviov Signed-off-by: Arturo Borrero Gonzalez --- extensions/libxt_t

[nft PATCH] tests/shell: add some tests for network namespaces

2016-04-06 Thread Arturo Borrero Gonzalez
A basic tests to check we can perform operations in different network namespaces. Signed-off-by: Arturo Borrero Gonzalez --- tests/shell/testcases/netns/0001nft-f_0 | 116 + tests/shell/testcases/netns/0002loosecommands_0 | 63 +++ tests/shell/testcases/net