summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
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)