diff options
author | Liping Zhang <zlpnobody@gmail.com> | 2017-03-22 21:00:47 +0800 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-03-22 14:10:47 +0100 |
commit | 5fec728cf69d137450e230a88793b1251176c035 (patch) | |
tree | c9b1e8ce6d0bdd81ec247ad891c61b4ae6e3fbe2 | |
parent | 9f223e612d3b0be6e4dca84e1db8042dbec64e93 (diff) |
examples: kill the "invalid argument" error in nftc-helper-add
NFCTH_PRIV_DATA_LEN is a must attribute required by the kernel when
creating the cthelper, add it now. Otherwise -EINVAL will be returned.
Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | examples/nfct-helper-add.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/nfct-helper-add.c b/examples/nfct-helper-add.c index cb7291e..79e0963 100644 --- a/examples/nfct-helper-add.c +++ b/examples/nfct-helper-add.c @@ -31,6 +31,7 @@ int main(int argc, char *argv[]) nfct_helper_attr_set_u32(nfct_helper, NFCTH_ATTR_QUEUE_NUM, atoi(argv[2])); nfct_helper_attr_set_u16(nfct_helper, NFCTH_ATTR_PROTO_L3NUM, AF_INET); nfct_helper_attr_set_u8(nfct_helper, NFCTH_ATTR_PROTO_L4NUM, IPPROTO_TCP); + nfct_helper_attr_set_u32(nfct_helper, NFCTH_ATTR_PRIV_DATA_LEN, 0); /* Will be freed by nfct_helper_free. */ p = nfct_helper_policy_alloc(); |