From 14fd3ad720f6ea629814b8e9307169010f596f6b Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Wed, 24 May 2017 20:05:54 +0200 Subject: 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 Acked-by: Pablo Neira Ayuso --- src/rule.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/rule.c') 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) -- cgit v1.2.3