summaryrefslogtreecommitdiffstats
path: root/src/expect/build.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2011-12-24 15:07:58 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2011-12-24 15:19:21 +0100
commit6a05d293fed594f89ad05625e43dec6a81da487d (patch)
treedbbf06572d0477df43c053ebe996133b144dae87 /src/expect/build.c
parent7843632196fd959f3f8f16f3d533c72d315a7e08 (diff)
expect: support CTA_EXPECT_HELP_NAME
This patch adds support for CTA_EXPECT_HELP_NAME. We now have the ATTR_EXP_HELPER_NAME attribute. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expect/build.c')
-rw-r--r--src/expect/build.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/expect/build.c b/src/expect/build.c
index c1a5a1d..82aa852 100644
--- a/src/expect/build.c
+++ b/src/expect/build.c
@@ -26,6 +26,13 @@ static void __build_flags(struct nfnlhdr *req,
nfnl_addattr32(&req->nlh, size, CTA_EXPECT_FLAGS,htonl(exp->flags));
}
+static void __build_helper_name(struct nfnlhdr *req, size_t size,
+ const struct nf_expect *exp)
+{
+ nfnl_addattr_l(&req->nlh, size, CTA_EXPECT_HELP_NAME,
+ exp->helper_name, strlen(exp->helper_name));
+}
+
int __build_expect(struct nfnl_subsys_handle *ssh,
struct nfnlhdr *req,
size_t size,
@@ -73,6 +80,8 @@ int __build_expect(struct nfnl_subsys_handle *ssh,
__build_flags(req, size, exp);
if (test_bit(ATTR_EXP_ZONE, exp->set))
__build_zone(req, size, exp);
+ if (test_bit(ATTR_EXP_HELPER_NAME, exp->set))
+ __build_helper_name(req, size, exp);
return 0;
}