summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfengweihao <[email protected]>2023-07-04 17:07:51 +0800
committerfengweihao <[email protected]>2023-07-04 17:07:51 +0800
commit5c2834c16996468b065919147c8efc4b5a9add88 (patch)
tree63ba08556133c813f8f648ccc7f8da144403a0f3
parentb20d497d693bb1d53d586670efd8e6e89496c045 (diff)
TSG-15831 修复ip归属地中字符串“null”展示问题v3.0.13-20230704
TSG-15750 修改策略验证Object Match限制为4096
-rw-r--r--platform/src/verify_matcher.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/src/verify_matcher.cpp b/platform/src/verify_matcher.cpp
index fb2a5ff..041ea3e 100644
--- a/platform/src/verify_matcher.cpp
+++ b/platform/src/verify_matcher.cpp
@@ -22,7 +22,7 @@
#include "verify_policy_utils.h"
#include "verify_policy_logging.h"
-#define HIT_PATH_SIZE 2048
+#define HIT_PATH_SIZE 4096
#define MAX_SCAN_RESULT 16
enum policy_action
@@ -1258,7 +1258,7 @@ int ip_location_scan(long long *result, struct ip_addr *sip, struct ip_addr *dip
if(ip_location_server!=NULL)
{
memset(buff,0,sizeof(buff));
- if(ip_location_server->subdivision_addr == NULL)
+ if(ip_location_server->subdivision_addr == NULL || strcasecmp(ip_location_server->subdivision_addr, "null") == 0)
{
snprintf(buff, sizeof(buff), "%s.%s.%s", ip_location_server->country_full, ip_location_server->province_full, ip_location_server->city_full);
}
@@ -1295,7 +1295,7 @@ int ip_location_scan(long long *result, struct ip_addr *sip, struct ip_addr *dip
if(ip_location_client!=NULL)
{
memset(buff,0,sizeof(buff));
- if(ip_location_client->subdivision_addr == NULL)
+ if(ip_location_client->subdivision_addr == NULL || strcasecmp(ip_location_client->subdivision_addr, "null") == 0)
{
snprintf(buff, sizeof(buff), "%s.%s.%s", ip_location_client->country_full, ip_location_client->province_full, ip_location_client->city_full);
}