diff options
-rw-r--r-- | src/modules/extra/m_geo_maxmind.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/extra/m_geo_maxmind.cpp b/src/modules/extra/m_geo_maxmind.cpp index e57908a77..6f84f31a3 100644 --- a/src/modules/extra/m_geo_maxmind.cpp +++ b/src/modules/extra/m_geo_maxmind.cpp @@ -97,6 +97,10 @@ class GeolocationAPIImpl : public Geolocation::APIBase Geolocation::Location* GetLocation(irc::sockets::sockaddrs& sa) CXX11_OVERRIDE { + // Skip trying to look up a UNIX socket. + if (sa.family() != AF_INET && sa.family() != AF_INET6) + return NULL; + // Attempt to look up the socket address. int result; MMDB_lookup_result_s lookup = MMDB_lookup_sockaddr(&mmdb, &sa.sa, &result); |