Fix MMDB::Lookup() to check result status correctly

This function confused checking the return value of MMDB_lookup_sockaddr() with
testing the value of the returned result.found_entry bit when that call
succeeds. Both need to happen.
This commit is contained in:
Christian Kreibich 2024-01-25 22:58:03 -08:00
parent 1044f4db0d
commit c2e791287e

View file

@ -148,7 +148,7 @@ bool MMDB::Lookup(const zeek::IPAddr& addr, MMDB_lookup_result_s& result) {
return false; return false;
} }
return true; return result.found_entry;
} }
// Check to see if the Maxmind DB should be closed and reopened. This will // Check to see if the Maxmind DB should be closed and reopened. This will