Closed darix closed 4 years ago
This is not currently available in mod_maxminddb
or the library it uses. It is feature specific to the third-party Ruby API you are using.
How much work would it be to fix that for the library? Should I open a bug there as well?
I guess one option would be to generate a custom ASN mmdb file based on the CSV and then expose the subnet in another field?
You could generate such an mmdb file. It would likely end up being fairly large as it wouldn't be able to deduplicate the records.
Adding support for retrieving the network is something we are considering for some of our APIs. You could open a bug against libmaxminddb
as well, if there isn't one, as that would need to be updated first.
This was done in #82. We have not done a release with it yet though.
The following ruby script
gives me this output (reformatted for readability):
How to access the "network" field from within mod_maxminddb? Are the ruby bindings just exposing this by accident? I just noticed the python bindings aren't exposing it.
It would be really helpful to replace mod_asn with mod_maxminddb.