path: root/src/conntrack/build_mnl.c
diff options
authorPablo Neira Ayuso <>2012-04-26 19:37:03 +0200
committerPablo Neira Ayuso <>2012-06-26 17:26:30 +0200
commit20cd0222c910e96c378e091e64b71d26e48916fe (patch)
tree377a770f8d42fb9fcab12cd9e3db7fe8212592f6 /src/conntrack/build_mnl.c
parentc69752e3dbf757aac336f4287eca11afef62a85c (diff)
conntrack: add nfct_set_attr_l and ATTR_HELPER_INFO
This adds the ATTR_HELPER_INFO that can be used to send binary data that will be attached to the conntrack. This is useful for the user-space connection tracking support. This patch also adds a new interface: nfct_set_attr_l(attr, type, value, length); that is used to set the variable length helper information. Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'src/conntrack/build_mnl.c')
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conntrack/build_mnl.c b/src/conntrack/build_mnl.c
index 997c2c9..46aec8a 100644
--- a/src/conntrack/build_mnl.c
+++ b/src/conntrack/build_mnl.c
@@ -363,6 +363,11 @@ nfct_build_helper_name(struct nlmsghdr *nlh, const struct nf_conntrack *ct)
nest = mnl_attr_nest_start(nlh, CTA_HELP);
mnl_attr_put_strz(nlh, CTA_HELP_NAME, ct->helper_name);
+ if (ct->helper_info != NULL) {
+ mnl_attr_put(nlh, CTA_HELP_INFO, ct->helper_info_len,
+ ct->helper_info);
+ }
mnl_attr_nest_end(nlh, nest);
return 0;