From c2e791287e29aaa362f726596b9360aeabd16322 Mon Sep 17 00:00:00 2001 From: Christian Kreibich Date: Thu, 25 Jan 2024 22:58:03 -0800 Subject: [PATCH] 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. --- src/MMDB.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MMDB.cc b/src/MMDB.cc index 45b6b0052b..617f064d8b 100644 --- a/src/MMDB.cc +++ b/src/MMDB.cc @@ -148,7 +148,7 @@ bool MMDB::Lookup(const zeek::IPAddr& addr, MMDB_lookup_result_s& result) { return false; } - return true; + return result.found_entry; } // Check to see if the Maxmind DB should be closed and reopened. This will