summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-05-24 20:05:54 +0200
committerFlorian Westphal <fw@strlen.de>2017-09-27 20:01:54 +0200
commit14fd3ad720f6ea629814b8e9307169010f596f6b (patch)
treef5d4dc764d3aed0d174d6cbfaa7abff5649e25df /src/rule.c
parent25831cdef94b4b86d12e3eec134dd029c37c479e (diff)
src: prepare for future ct timeout policy support
Change all places that expect ct helper tokens (ct helper configuration) to CT HELPER. ct_obj_kind is removed. When we add ct timeout support, we will add a new ct_timeout_block, plus extra rules. We won't extend ct_block, it prevents the parser from detecting bogus syntax that only makes sense for ct helper but not for something else for instance. ct_block should be renamed to ct_helper_block, will be done in followup patch. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rule.c b/src/rule.c
index 1e0558ea..30d3693a 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -1742,10 +1742,13 @@ static int do_command_describe(struct netlink_ctx *ctx, struct cmd *cmd)
}
struct cmd *cmd_alloc_obj_ct(enum cmd_ops op, int type, const struct handle *h,
- const struct location *loc, void *data)
+ const struct location *loc, struct obj *obj)
{
enum cmd_obj cmd_obj;
+ if (obj)
+ obj->type = type;
+
switch (type) {
case NFT_OBJECT_CT_HELPER:
cmd_obj = CMD_OBJ_CT_HELPER;
@@ -1754,7 +1757,7 @@ struct cmd *cmd_alloc_obj_ct(enum cmd_ops op, int type, const struct handle *h,
BUG("missing type mapping");
}
- return cmd_alloc(op, cmd_obj, h, loc, data);
+ return cmd_alloc(op, cmd_obj, h, loc, obj);
}
int do_command(struct netlink_ctx *ctx, struct cmd *cmd)