summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/json.c2
-rw-r--r--src/parser_json.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/json.c b/src/json.c
index e458eb3e..1b73b919 100644
--- a/src/json.c
+++ b/src/json.c
@@ -275,7 +275,7 @@ static json_t *obj_print_json(struct output_ctx *octx, const struct obj *obj)
case NFT_OBJECT_CT_HELPER:
type = "ct helper";
tmp = json_pack("{s:s, s:o, s:s}",
- "helper", obj->ct_helper.name, "protocol",
+ "type", obj->ct_helper.name, "protocol",
proto_name_json(obj->ct_helper.l4proto),
"l3proto", family2str(obj->ct_helper.l3proto));
json_object_update(root, tmp);
diff --git a/src/parser_json.c b/src/parser_json.c
index f872977f..993368f0 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -2643,14 +2643,14 @@ static struct cmd *json_parse_cmd_add_object(struct json_ctx *ctx,
case NFT_OBJECT_CT_HELPER:
cmd_obj = CMD_OBJ_CT_HELPER;
obj->type = NFT_OBJECT_CT_HELPER;
- if (!json_unpack(root, "{s:s}", "helper", &tmp)) {
+ if (!json_unpack(root, "{s:s}", "type", &tmp)) {
int ret;
ret = snprintf(obj->ct_helper.name,
sizeof(obj->ct_helper.name), "%s", tmp);
if (ret < 0 ||
ret >= (int)sizeof(obj->ct_helper.name)) {
- json_error(ctx, "Invalid CT helper name '%s', max length is %zu.",
+ json_error(ctx, "Invalid CT helper type '%s', max length is %zu.",
tmp, sizeof(obj->ct_helper.name));
obj_free(obj);
return NULL;