From a94b7d55b501fbe177300058222ff197ac975b5a Mon Sep 17 00:00:00 2001 From: luwenpeng Date: Fri, 27 Sep 2024 16:19:55 +0800 Subject: [PATCH] bugfix: parse vsys_id of PXY_INTERCEPT_RULE --- common/src/intercept_policy.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/src/intercept_policy.cpp b/common/src/intercept_policy.cpp index 0921b84..b69be67 100644 --- a/common/src/intercept_policy.cpp +++ b/common/src/intercept_policy.cpp @@ -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)