summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluwenpeng <[email protected]>2023-05-26 14:46:36 +0800
committerluwenpeng <[email protected]>2023-05-26 14:46:36 +0800
commitd7cf27a0a1efa166bc66d9c46fb38d6ff436afe7 (patch)
tree1e18c18769e9bc26d8e8db03c98f9ce87adbbfd9
parent8082a3f9e81894a69964d6f8586f7b9a6746366e (diff)
TSG-15204 TFE适配拦截策略user_region中删除protocol字段v4.8.15-20230526
-rw-r--r--common/src/intercept_policy.cpp11
-rw-r--r--plugin/business/traffic-mirror/src/entry.cpp11
2 files changed, 0 insertions, 22 deletions
diff --git a/common/src/intercept_policy.cpp b/common/src/intercept_policy.cpp
index 134525a..18d757a 100644
--- a/common/src/intercept_policy.cpp
+++ b/common/src/intercept_policy.cpp
@@ -73,17 +73,6 @@ static void intercept_param_new_cb(const char *table_name, int table_id, const c
}
vsys_id = item->valueint;
- item = cJSON_GetObjectItem(json, "protocol");
- if (unlikely(!item || !cJSON_IsString(item)))
- {
- TFE_LOG_ERROR(enforcer->logger, "Invalid intercept parameter: %s invalid protocol format", key);
- goto error_out;
- }
- if (0 != strcasecmp(item->valuestring, "SSL") && 0 != strcasecmp(item->valuestring, "HTTP"))
- {
- goto error_out;
- }
-
param = ALLOC(struct intercept_param, 1);
param->vsys_id = vsys_id;
param->rule_id = atoll(key);
diff --git a/plugin/business/traffic-mirror/src/entry.cpp b/plugin/business/traffic-mirror/src/entry.cpp
index 9e5b801..bbf4ee0 100644
--- a/plugin/business/traffic-mirror/src/entry.cpp
+++ b/plugin/business/traffic-mirror/src/entry.cpp
@@ -85,17 +85,6 @@ void policy_table_ex_data_new_cb(const char *table_name, int table_id, const cha
goto ignore;
}
- json_item=cJSON_GetObjectItem(json_root, "protocol");
- if (unlikely(!json_item || !cJSON_IsString(json_item)))
- {
- TFE_LOG_ERROR(instance->logger, "invalid JSON, protocol not existed or invalid type.");
- goto ignore;
- }
- if(0!=strcasecmp(json_item->valuestring, "SSL")&& 0!=strcasecmp(json_item->valuestring, "HTTP"))
- {
- goto out;
- }
-
json_subroot = cJSON_GetObjectItem(json_root, "traffic_mirror");
if (unlikely(!json_subroot))
{