On 2019-09-17 11:00 a.m., Patrick Matthäi wrote:
Could you test the patch below? It should restore the behaviour for
those IPs. then they are (again) listed as "serbia":
That patch did not help. I looked into it further, and the error is
triggered on the other "Unrecognized country code" circa line 1100.
This very similar patch makes it work:
--- geoip-csv-to-dat.cpp.orig 2019-09-17 07:31:42.000000000 -0400
+++ geoip-csv-to-dat.cpp 2019-09-17 11:34:59.180224941 -0400
@@ -1103,6 +1109,9 @@
if (csv_fields[CSV_FIELD_COUNTRY_CODE] == "AN") {
csv_fields[CSV_FIELD_COUNTRY_CODE] = "CW";
}
+ else if (csv_fields[CSV_FIELD_COUNTRY_CODE] == "XK") {
+ csv_fields[CSV_FIELD_COUNTRY_CODE] = "RS";
+ }
const int countryid =
GeoIP_id_by_code(csv_fields[CSV_FIELD_COUNTRY_CODE].c_str());
if (countryid == 0) {
Note, the other patch circa line 873 is not needed. So, perhaps there is
some nicer solution to fix this method, but the special case does work.
--Pat