"geoip-use-ecs" broken with libmaxminddb 1.4.0+
An upstream code change introduced in libmaxminddb 1.4.0 causes the geoip2
system test on v9_11 to consistently fail due to the libmaxminddb library apparently thinking that 127.0.0.1 matches the ::10.53.0.1/128
IP range:
$ grep . bin/tests/system/geoip2/dig.out.ns2.test31.*
bin/tests/system/geoip2/dig.out.ns2.test31.1:"1"
bin/tests/system/geoip2/dig.out.ns2.test31.2:"2"
bin/tests/system/geoip2/dig.out.ns2.test31.3:"3"
bin/tests/system/geoip2/dig.out.ns2.test31.4:"4"
bin/tests/system/geoip2/dig.out.ns2.test31.5:"5"
bin/tests/system/geoip2/dig.out.ns2.test31.6:"6"
bin/tests/system/geoip2/dig.out.ns2.test31.7:"7"
bin/tests/system/geoip2/dig.out.ns2.test31.ecs.1:"1"
bin/tests/system/geoip2/dig.out.ns2.test31.ecs.2:"1"
bin/tests/system/geoip2/dig.out.ns2.test31.ecs.3:"1"
bin/tests/system/geoip2/dig.out.ns2.test31.ecs.4:"1"
bin/tests/system/geoip2/dig.out.ns2.test31.ecs.5:"1"
bin/tests/system/geoip2/dig.out.ns2.test31.ecs.6:"1"
bin/tests/system/geoip2/dig.out.ns2.test31.ecs.7:"1"
I know nothing about how libmaxminddb matches stuff internally, neither have I had the time to examine what the aforementioned upstream change does. This may even be an upstream bug in the library, but I would rather exercise caution before telling folks something they wrote does not work as intended when I am not 100% sure what those intentions are ;) To a novice like me, it looks like the library might now be treating an address from an unknown IP range as matching the first IP range defined in the database?
I tried rebuilding the *.mmdb
files from *.json
files in bin/tests/system/geoip2/data/
using the write-test-data.pl
script, but that did not change anything.
While this report only strictly applies to 9.11 because that is the only branch where the failing test still exists (use-geoip-ecs
was ripped out in later releases), perhaps it is a symptom of an unexpected behavior which is not limited to our tests, but rather one that is occurring with newer versions of libmaxminddb in general (and we are simply unaware of it)?
@each, do you have any ideas on how to approach this?