From fb16275a891c6fac648ec4682604c3a995877284 Mon Sep 17 00:00:00 2001 From: fengweihao Date: Fri, 28 May 2021 16:29:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0ip=E5=BD=92=E5=B1=9E=E5=9C=B0?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scan/src/policy_scan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scan/src/policy_scan.cpp b/scan/src/policy_scan.cpp index 6a78111..b338696 100644 --- a/scan/src/policy_scan.cpp +++ b/scan/src/policy_scan.cpp @@ -831,7 +831,7 @@ int http_ip_location_scan(struct Maat_rule_t *result, struct ip_address *sip, st if(ip_location_server!=NULL) { memset(buff,0,sizeof(buff)); - snprintf(buff, sizeof(buff), "%s,%s", ip_location_server->city_full,ip_location_server->country_full); + snprintf(buff, sizeof(buff), "%s,%s,%s", ip_location_server->city_full, ip_location_server->province_full, ip_location_server->country_full); ctx->ip_ctx.location_server=strdup(buff); ip_location_table = (policy_type == PXY_TABLE_SECURITY) ? (int)PXY_SECURITY_IP_DST_LOCATION : (int)PXY_CTRL_IP_DST_LOCATION; @@ -850,7 +850,7 @@ int http_ip_location_scan(struct Maat_rule_t *result, struct ip_address *sip, st if(ip_location_client!=NULL) { memset(buff,0,sizeof(buff)); - snprintf(buff, sizeof(buff), "%s,%s", ip_location_client->city_full, ip_location_client->country_full); + snprintf(buff, sizeof(buff), "%s,%s,%s", ip_location_client->city_full, ip_location_client->province_full, ip_location_client->country_full); ctx->ip_ctx.location_client=strdup(buff); ip_location_table = (policy_type == PXY_TABLE_SECURITY) ? (int)PXY_SECURITY_IP_SRC_LOCATION : (int)PXY_CTRL_IP_SRC_LOCATION;