diff options
| author | fengweihao <[email protected]> | 2021-05-28 16:29:38 +0800 |
|---|---|---|
| committer | fengweihao <[email protected]> | 2021-05-28 16:29:38 +0800 |
| commit | fb16275a891c6fac648ec4682604c3a995877284 (patch) | |
| tree | 256604bc2598e49005642d01436c92b2fc7056f3 | |
| parent | 70c2166fc75833d92b3264c1e4751e6a905ab19f (diff) | |
增加ip归属地区域字段v2.1.11-20210528.2
| -rw-r--r-- | scan/src/policy_scan.cpp | 4 |
1 files 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; |
