Change insert_profile to object_profile and fix ip_tag scanning issue

This commit is contained in:
fengweihao
2024-10-22 15:29:12 +08:00
parent c1df25d745
commit f24a349a42
2 changed files with 7 additions and 2 deletions

View File

@@ -220,7 +220,6 @@ int tfe_scan_ip_tags(const struct tfe_stream *stream, uuid_t *result, struct maa
if(n_tag_ids == 0) if(n_tag_ids == 0)
{ {
TFE_LOG_DEBUG(logger, "fetch src ip tags: NULL"); TFE_LOG_DEBUG(logger, "fetch src ip tags: NULL");
return hit_cnt_ip;
} }
tfe_tags_log(opt_val, n_tag_ids, "src ip", logger); tfe_tags_log(opt_val, n_tag_ids, "src ip", logger);

View File

@@ -614,7 +614,7 @@ void policy_action_param_new(const char *table_name, const char* key, const char
{ {
param->hit_rule.vsys_id=item->valueint; param->hit_rule.vsys_id=item->valueint;
} }
item=cJSON_GetObjectItem(action_parameter,"insert_profile"); item=cJSON_GetObjectItem(action_parameter,"inject_profile");
if(item && item->type==cJSON_String) if(item && item->type==cJSON_String)
{ {
param->profile_uuid_str =tfe_strdup(item->valuestring); param->profile_uuid_str =tfe_strdup(item->valuestring);
@@ -2398,6 +2398,12 @@ static int format_insert_rule(char *profile_uuid, struct insert_rule *rule)
{ {
int ret = 0; int ret = 0;
if(profile_uuid == NULL)
{
ret=-1;
return ret;
}
struct manipulate_profile* insert_profile=get_profile_by_id("PROXY_INJECT_SCRIPT", profile_uuid); struct manipulate_profile* insert_profile=get_profile_by_id("PROXY_INJECT_SCRIPT", profile_uuid);
if(insert_profile==NULL) if(insert_profile==NULL)
{ {