TSG-22699 适配控制报文修改
This commit is contained in:
@@ -152,22 +152,22 @@ int tfe_get_library_tags(const struct tfe_stream *stream, cJSON *common_obj, tfe
|
||||
struct library_tag_ctx *library_tag =(struct library_tag_ctx *)maat_plugin_table_get_ex_data(tfe_get_maat_handle(), tfe_bussiness_tableid_get(PXY_CTRL_LIBRARY_TAG), (const char *)&tag_id_array[i], sizeof(long long));
|
||||
if(library_tag != NULL)
|
||||
{
|
||||
if(library_tag->category == CATEGORY_TYPE_ASN && tlv_type == TFE_CMSG_SRC_IP_TAGS_IDS_STR && atol(library_tag->tag_value) > 0)
|
||||
if(library_tag->category == CATEGORY_TYPE_ASN && tlv_type == TFE_CMSG_SRC_IP_TAGS_IDS_ARR && atol(library_tag->tag_value) > 0)
|
||||
{
|
||||
cJSON_AddNumberToObject(common_obj, "client_asn", atol(library_tag->tag_value));
|
||||
}
|
||||
|
||||
if(library_tag->category == CATEGORY_TYPE_CONTRY_CODE && tlv_type== TFE_CMSG_SRC_IP_TAGS_IDS_STR)
|
||||
if(library_tag->category == CATEGORY_TYPE_CONTRY_CODE && tlv_type== TFE_CMSG_SRC_IP_TAGS_IDS_ARR)
|
||||
{
|
||||
cJSON_AddStringToObject(common_obj, "client_country", library_tag->tag_value);
|
||||
}
|
||||
|
||||
if(library_tag->category == CATEGORY_TYPE_ASN && tlv_type == TFE_CMSG_DST_IP_TAGS_IDS_STR && atol(library_tag->tag_value) > 0)
|
||||
if(library_tag->category == CATEGORY_TYPE_ASN && tlv_type == TFE_CMSG_DST_IP_TAGS_IDS_ARR && atol(library_tag->tag_value) > 0)
|
||||
{
|
||||
cJSON_AddNumberToObject(common_obj, "server_asn", atol(library_tag->tag_value));
|
||||
}
|
||||
|
||||
if(library_tag->category == CATEGORY_TYPE_CONTRY_CODE && tlv_type== TFE_CMSG_DST_IP_TAGS_IDS_STR)
|
||||
if(library_tag->category == CATEGORY_TYPE_CONTRY_CODE && tlv_type== TFE_CMSG_DST_IP_TAGS_IDS_ARR)
|
||||
{
|
||||
cJSON_AddStringToObject(common_obj, "server_country", library_tag->tag_value);
|
||||
}
|
||||
@@ -190,7 +190,7 @@ int tfe_scan_ip_tags(const struct tfe_stream *stream, long long *result, struct
|
||||
int scan_ret = 0, hit_cnt_ip = 0, n_tag_ids = 0;
|
||||
char opt_val[128]={0};
|
||||
|
||||
n_tag_ids = tfe_get_entry_tags(stream, (enum tfe_cmsg_tlv_type)TFE_CMSG_SRC_IP_TAGS_IDS_STR, opt_val, tag_id_array);
|
||||
n_tag_ids = tfe_get_entry_tags(stream, (enum tfe_cmsg_tlv_type)TFE_CMSG_SRC_IP_TAGS_IDS_ARR, opt_val, tag_id_array);
|
||||
if(n_tag_ids == 0)
|
||||
{
|
||||
return hit_cnt_ip;
|
||||
@@ -224,7 +224,7 @@ int tfe_scan_ip_tags(const struct tfe_stream *stream, long long *result, struct
|
||||
memset(opt_val, 0, sizeof(opt_val));
|
||||
memset(tag_id_array, 0, sizeof(tag_id_array));
|
||||
|
||||
n_tag_ids = tfe_get_entry_tags(stream, (enum tfe_cmsg_tlv_type)TFE_CMSG_DST_IP_TAGS_IDS_STR, opt_val, tag_id_array);
|
||||
n_tag_ids = tfe_get_entry_tags(stream, (enum tfe_cmsg_tlv_type)TFE_CMSG_DST_IP_TAGS_IDS_ARR, opt_val, tag_id_array);
|
||||
if(n_tag_ids == 0)
|
||||
{
|
||||
return hit_cnt_ip;
|
||||
@@ -261,7 +261,7 @@ int tfe_scan_fqdn_tags(const struct tfe_stream *stream, long long *result, struc
|
||||
long long tag_id_array[128]={0};
|
||||
int scan_ret = 0, hit_cnt_fqdn = 0, n_tag_ids = 0;
|
||||
|
||||
n_tag_ids = tfe_get_entry_tags(stream, (enum tfe_cmsg_tlv_type)TFE_CMSG_FQDN_TAGS_IDS_STR, opt_val, tag_id_array);
|
||||
n_tag_ids = tfe_get_entry_tags(stream, (enum tfe_cmsg_tlv_type)TFE_CMSG_FQDN_TAGS_IDS_ARR, opt_val, tag_id_array);
|
||||
if(n_tag_ids == 0)
|
||||
{
|
||||
return hit_cnt_fqdn;
|
||||
|
||||
Reference in New Issue
Block a user