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);
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;