Wireshark-dev: Re: [Wireshark-dev] Crash in epan/geoip_db.c
From: João Valverde <joao.valverde@xxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Feb 2017 18:17:51 +0000


On 02/22/2017 06:01 PM, Gisle Vanem wrote:
Guy Harris wrote:

They (MaxMind) might want to consider having a cleanup routine anyway, given that 1) their code works
on Windows and 2) unless the GeoIP library and the code that calls it are built with the same version
of MSVC, or the "universal CRT" or whatever it's called is being used, Bad Things can happen if the code
that calls it frees stuff allocated by the library, as the allocation and freeing will be done by
different versions of the C runtime library.

AFAIK, one cannot use GeoIP as a .DLL. But a static lib is fine with me.

BTW the Tor-project uses MaxMind's Geo-IP information via some CVS-files
  parsed at runtime:
   https://gitweb.torproject.org/tor.git/tree/src/or/geoip.c
   https://gitweb.torproject.org/tor.git/tree/src/config/geoip

It's super-fast and something to consider for Wireshark too IMHO.
I suspect the .mmdb files are more up-to-date than the .dat files.


See bug 10658. [1]

Tor has its own GeoLite2 implementation, that's not something I would like for Wireshark but I wouldn't oppose either, if another developer is +2.

[1] https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10658