From b24f4ac006dcc3f2c6a904af2f3eb02bd4d16ea2 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 7 Oct 2010 17:43:41 +0200 Subject: expect: add CTA_EXPECT_ZONE support We also remove the reference to CTA_EXPECT_QUEUENR with was not ever pushed into Linux kernel mainline. Signed-off-by: Pablo Neira Ayuso --- src/expect/build.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/expect/build.c') diff --git a/src/expect/build.c b/src/expect/build.c index cb9071d..e7f547f 100644 --- a/src/expect/build.c +++ b/src/expect/build.c @@ -14,6 +14,12 @@ static void __build_timeout(struct nfnlhdr *req, nfnl_addattr32(&req->nlh, size, CTA_EXPECT_TIMEOUT,htonl(exp->timeout)); } +static void __build_zone(struct nfnlhdr *req, size_t size, + const struct nf_expect *exp) +{ + nfnl_addattr16(&req->nlh, size, CTA_EXPECT_ZONE, htons(exp->zone)); +} + int __build_expect(struct nfnl_subsys_handle *ssh, struct nfnlhdr *req, size_t size, @@ -58,5 +64,8 @@ int __build_expect(struct nfnl_subsys_handle *ssh, if (test_bit(ATTR_EXP_TIMEOUT, exp->set)) __build_timeout(req, size, exp); + if (test_bit(ATTR_EXP_ZONE, exp->set)) + __build_zone(req, size, exp); + return 0; } -- cgit v1.2.3