Blame SOURCES/0004-examples-kill-the-invalid-argument-error-in-nftc-hel.patch

8a5747
From 61c5a2b5cf1632d118ffff96edf30862b873b021 Mon Sep 17 00:00:00 2001
8a5747
From: Liping Zhang <zlpnobody@gmail.com>
8a5747
Date: Wed, 22 Mar 2017 21:00:47 +0800
8a5747
Subject: [PATCH] examples: kill the "invalid argument" error in
8a5747
 nftc-helper-add
8a5747
8a5747
NFCTH_PRIV_DATA_LEN is a must attribute required by the kernel when
8a5747
creating the cthelper, add it now. Otherwise -EINVAL will be returned.
8a5747
8a5747
Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
8a5747
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
8a5747
(cherry picked from commit 5fec728cf69d137450e230a88793b1251176c035)
8a5747
---
8a5747
 examples/nfct-helper-add.c | 1 +
8a5747
 1 file changed, 1 insertion(+)
8a5747
8a5747
diff --git a/examples/nfct-helper-add.c b/examples/nfct-helper-add.c
8a5747
index cb7291e8ec4b0..79e09637415d3 100644
8a5747
--- a/examples/nfct-helper-add.c
8a5747
+++ b/examples/nfct-helper-add.c
8a5747
@@ -31,6 +31,7 @@ int main(int argc, char *argv[])
8a5747
 	nfct_helper_attr_set_u32(nfct_helper, NFCTH_ATTR_QUEUE_NUM, atoi(argv[2]));
8a5747
 	nfct_helper_attr_set_u16(nfct_helper, NFCTH_ATTR_PROTO_L3NUM, AF_INET);
8a5747
 	nfct_helper_attr_set_u8(nfct_helper, NFCTH_ATTR_PROTO_L4NUM, IPPROTO_TCP);
8a5747
+	nfct_helper_attr_set_u32(nfct_helper, NFCTH_ATTR_PRIV_DATA_LEN, 0);
8a5747
 
8a5747
 	/* Will be freed by nfct_helper_free. */
8a5747
 	p = nfct_helper_policy_alloc();
8a5747
-- 
8a5747
2.34.1
8a5747