Property name "helper" was a bit unclear, "type" is better. Signed-off-by: Phil Sutter <phil@xxxxxx> --- src/json.c | 2 +- src/parser_json.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/json.c b/src/json.c index e458eb3e4bdd8..1b73b919d5df2 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 f872977f5bcb4..993368f04ea4a 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; -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html