mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Warn and exit when we are configured to measure GeoIP statistics, but have no GeoIP database.
This commit is contained in:
parent
db576626e1
commit
dfebc88d56
@ -1378,6 +1378,14 @@ options_act(or_options_t *old_options)
|
||||
geoip_load_file(actual_fname, options);
|
||||
tor_free(actual_fname);
|
||||
}
|
||||
#ifdef ENABLE_GEOIP_STATS
|
||||
/* Check if GeoIP database could be loaded. */
|
||||
if (!geoip_is_loaded()) {
|
||||
log_warn(LD_CONFIG, "Configured to measure GeoIP statistics, but no "
|
||||
"GeoIP database found!");
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
/* Check if we need to parse and add the EntryNodes config option. */
|
||||
if (options->EntryNodes &&
|
||||
(!old_options ||
|
||||
|
Loading…
Reference in New Issue
Block a user