Module: kamailio
Branch: 4.4
Commit: 486341c76bc09fb5ead0fa63b890adb260871740
URL:
https://github.com/kamailio/kamailio/commit/486341c76bc09fb5ead0fa63b890adb…
Author: Sergey Okhapkin <root(a)west2.callwithus.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-03-30T14:32:58+02:00
geoip2: Improve detection of addresses used by anonymous proxies
(cherry picked from commit c49011c2cc63d35bca6904748da166814a792fc9)
---
Modified: modules/geoip2/geoip2_pv.c
---
Diff:
https://github.com/kamailio/kamailio/commit/486341c76bc09fb5ead0fa63b890adb…
Patch:
https://github.com/kamailio/kamailio/commit/486341c76bc09fb5ead0fa63b890adb…
---
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;