bugfix: parse vsys_id of PXY_INTERCEPT_RULE

This commit is contained in:
luwenpeng
2024-09-27 16:19:55 +08:00
parent bb9f4eecc1
commit a94b7d55b5

View File

@@ -102,6 +102,15 @@ static void intercept_param_new_cb(const char *table_name, const char *key, cons
goto error_out;
}
// vsys_id
item = cJSON_GetObjectItem(json_subroot, "vsys_id");
if (!item || !cJSON_IsNumber(item))
{
TFE_LOG_ERROR(enforcer->logger, "Invalid intercept rule:%s (invalid vsys_id format) %s.", key, table_line);
goto error_out;
}
param->vsys_id = item->valueint;
// keyring_for_trusted
item = cJSON_GetObjectItem(json_subroot, "keyring_for_trusted");
if (item)