diff options
| author | luwenpeng <[email protected]> | 2024-09-27 16:19:55 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2024-09-27 16:19:55 +0800 |
| commit | a94b7d55b501fbe177300058222ff197ac975b5a (patch) | |
| tree | 9ecf7403dd3c6267488a74fd965314bb4a56a8bc | |
| parent | bb9f4eecc1b8a4ed4dd592f14196c5719f8454ba (diff) | |
bugfix: parse vsys_id of PXY_INTERCEPT_RULE
| -rw-r--r-- | common/src/intercept_policy.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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) |
