TSG-9860 修复代理策略无法支持三级归属地命中
This commit is contained in:
@@ -186,14 +186,7 @@ int tfe_scan_ip_location(const struct tfe_stream *stream, struct Maat_rule_t *re
|
|||||||
{
|
{
|
||||||
memset(buff, 0, sizeof(buff));
|
memset(buff, 0, sizeof(buff));
|
||||||
|
|
||||||
if(strlen(dst_subdivsion))
|
snprintf(buff, sizeof(buff),"%s.%s.%s.%s.", dst_country, dst_provine, dst_city, dst_subdivsion);
|
||||||
{
|
|
||||||
snprintf(buff, sizeof(buff),"%s.%s.%s.%s.", dst_country, dst_provine, dst_city, dst_subdivsion);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
snprintf(buff, sizeof(buff), "%s.%s.", dst_country, dst_city);
|
|
||||||
}
|
|
||||||
scan_ret = Maat_full_scan_string(tfe_bussiness_resouce_get(STATIC_MAAT), tfe_bussiness_tableid_get(TABLE_SECURITY_DESTINATION_LOCATION),
|
scan_ret = Maat_full_scan_string(tfe_bussiness_resouce_get(STATIC_MAAT), tfe_bussiness_tableid_get(TABLE_SECURITY_DESTINATION_LOCATION),
|
||||||
CHARSET_GBK, buff, strlen(buff),
|
CHARSET_GBK, buff, strlen(buff),
|
||||||
result + hit_cnt + hit_cnt_ip, NULL, MAX_SCAN_RESULT - hit_cnt - hit_cnt_ip,
|
result + hit_cnt + hit_cnt_ip, NULL, MAX_SCAN_RESULT - hit_cnt - hit_cnt_ip,
|
||||||
@@ -223,14 +216,8 @@ int tfe_scan_ip_location(const struct tfe_stream *stream, struct Maat_rule_t *re
|
|||||||
if (strlen(src_country) || strlen(src_city))
|
if (strlen(src_country) || strlen(src_city))
|
||||||
{
|
{
|
||||||
memset(buff, 0, sizeof(buff));
|
memset(buff, 0, sizeof(buff));
|
||||||
if(strlen(src_subdivsion))
|
|
||||||
{
|
snprintf(buff, sizeof(buff), "%s.%s.%s.%s.", src_country, src_provine, src_city, src_subdivsion);
|
||||||
snprintf(buff, sizeof(buff), "%s.%s.%s.%s.", src_country, src_provine, src_city, src_subdivsion);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
snprintf(buff, sizeof(buff), "%s.%s.", src_country, src_city);
|
|
||||||
}
|
|
||||||
scan_ret = Maat_full_scan_string(tfe_bussiness_resouce_get(STATIC_MAAT), tfe_bussiness_tableid_get(TABLE_SECURITY_SOURCE_LOCATION),
|
scan_ret = Maat_full_scan_string(tfe_bussiness_resouce_get(STATIC_MAAT), tfe_bussiness_tableid_get(TABLE_SECURITY_SOURCE_LOCATION),
|
||||||
CHARSET_GBK, buff, strlen(buff),
|
CHARSET_GBK, buff, strlen(buff),
|
||||||
result + hit_cnt + hit_cnt_ip, NULL, MAX_SCAN_RESULT - hit_cnt - hit_cnt_ip,
|
result + hit_cnt + hit_cnt_ip, NULL, MAX_SCAN_RESULT - hit_cnt - hit_cnt_ip,
|
||||||
|
|||||||
Reference in New Issue
Block a user