diff options
author | John Thacker <johnthacker@gmail.com> | 2023-03-25 20:49:47 -0400 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2023-04-07 00:31:37 +0000 |
commit | 79812ca1100310dd9239dc16cd439572000a3c29 (patch) | |
tree | ca898d421e59b6847d05c06d19260b788d878c15 /epan/addr_resolv.c | |
parent | 7482a45b399275094e1ed04530f200469469aeca (diff) |
MaxMindDB: Move pref to Name Resolution prefs
Move MaxMind lookups to a global Name Resolution preference.
That's a bit of a misnomer (it's not name resolution, but it
is using external sources of data to update information about
a network object), but the MaxMind DB path location is already there.
This means that MaxMind lookups can be disabled with the '-n'
option, and enabled with a 'g' for the '-N' option. This is
significant for tshark, because MaxMind lookups are now synchronous.
Disabling the new global preference also keeps the Endpoints window
from doing MaxMind lookups; currently, even if the IPv4 and IPv6 GeoIP
prefs are disabled the data is still looked up and inserted in the
Endpoints window.
Fix #14692
Diffstat (limited to 'epan/addr_resolv.c')
-rw-r--r-- | epan/addr_resolv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c index f32bb3b509..7887cf9d27 100644 --- a/epan/addr_resolv.c +++ b/epan/addr_resolv.c @@ -281,7 +281,8 @@ e_addr_resolve gbl_resolv_flags = { TRUE, /* use_external_net_name_resolver */ FALSE, /* load_hosts_file_from_profile_only */ FALSE, /* vlan_name */ - FALSE /* ss7 point code names */ + FALSE, /* ss7 point code names */ + TRUE, /* maxmind_geoip */ }; static guint name_resolve_concurrency = 500; static gboolean resolve_synchronously = FALSE; @@ -2936,6 +2937,7 @@ addr_resolve_pref_init(module_t *nameres) void addr_resolve_pref_apply(void) { c_ares_set_dns_servers(); + maxmind_db_pref_apply(); } void @@ -2947,6 +2949,7 @@ disable_name_resolution(void) { gbl_resolv_flags.use_external_net_name_resolver = FALSE; gbl_resolv_flags.vlan_name = FALSE; gbl_resolv_flags.ss7pc_name = FALSE; + gbl_resolv_flags.maxmind_geoip = FALSE; } gboolean |