[sr-dev] git:master:c49011c2: geoip2: Improve detection of addresses used by anonymous proxies
Daniel-Constantin Mierla
miconda at gmail.com
Tue Mar 29 23:22:58 CEST 2016
Module: kamailio
Branch: master
Commit: c49011c2cc63d35bca6904748da166814a792fc9
URL: https://github.com/kamailio/kamailio/commit/c49011c2cc63d35bca6904748da166814a792fc9
Author: Sergey Okhapkin <root at west2.callwithus.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-03-29T23:21:46+02:00
geoip2: Improve detection of addresses used by anonymous proxies
---
Modified: modules/geoip2/geoip2_pv.c
---
Diff: https://github.com/kamailio/kamailio/commit/c49011c2cc63d35bca6904748da166814a792fc9.diff
Patch: https://github.com/kamailio/kamailio/commit/c49011c2cc63d35bca6904748da166814a792fc9.patch
---
diff --git a/modules/geoip2/geoip2_pv.c b/modules/geoip2/geoip2_pv.c
index 69bd719..e239d96 100644
--- a/modules/geoip2/geoip2_pv.c
+++ b/modules/geoip2/geoip2_pv.c
@@ -407,7 +407,11 @@ int pv_get_geoip2(struct sip_msg *msg, pv_param_t *param,
return pv_get_null(msg, param, res);
if(MMDB_get_value(&gpv->item->r.record.entry, &entry_data,
"country","iso_code", NULL
- ) != MMDB_SUCCESS)
+ ) != MMDB_SUCCESS
+ && MMDB_get_value(&gpv->item->r.record.entry, &entry_data,
+ "registered_country","iso_code", NULL
+ ) != MMDB_SUCCESS
+ )
return pv_get_null(msg, param, res);
if(entry_data.has_data && entry_data.type == MMDB_DATA_TYPE_UTF8_STRING) {
gpv->item->r.country.s = (char *)entry_data.utf8_string;
More information about the sr-dev
mailing list