[PATCH 2/2 libnftnl] tests: Check set user data

2016-06-27 Thread Carlos Falgueras García
Signed-off-by: Carlos Falgueras García --- tests/nft-set-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/nft-set-test.c b/tests/nft-set-test.c index f6fbfb5..173c17f 100644 --- a/tests/nft-set-test.c +++ b/tests/nft-set-test.c @@ -47,6 +47,9 @@ static

[PATCH 1/2 libnftnl] set: Add new attribute into 'set' to store user data

2016-06-27 Thread Carlos Falgueras García
The new structure 'user' holds a pointer to user data and its length. The kernel must have the flag NFTA_SET_USERDATA to support this feature. Signed-off-by: Carlos Falgueras García --- include/libnftnl/set.h | 1 + include/set.h | 4 src/set.c

[PATCH libnftnl] set: Fix nftnl_set_set_str

2016-06-27 Thread Carlos Falgueras García
We need the string length Signed-off-by: Carlos Falgueras García --- src/set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/set.c b/src/set.c index 879100c..edbcbe5 100644 --- a/src/set.c +++ b/src/set.c @@ -203,7 +203,7 @@

[PATCH iptables] extensions: libipt_realm: fix order of mask and id when do nft translation

2016-06-27 Thread Liping Zhang
From: Liping Zhang Before: # iptables-translate -A INPUT -m realm --realm 1/0xf nft add rule ip filter INPUT rtclassid and 0x1 == 0xf counter Apply this patch: # iptables-translate -A INPUT -m realm --realm 1/0xf nft add rule ip filter INPUT rtclassid and