mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix bug 932 even more.
Ignore connections two hours after switching from bridge to relay or back.
This commit is contained in:
+1
-1
@@ -1331,7 +1331,7 @@ options_act(or_options_t *old_options)
|
|||||||
|
|
||||||
if (! bool_eq(options->BridgeRelay, old_options->BridgeRelay)) {
|
if (! bool_eq(options->BridgeRelay, old_options->BridgeRelay)) {
|
||||||
log_info(LD_GENERAL, "Bridge status changed. Forgetting GeoIP stats.");
|
log_info(LD_GENERAL, "Bridge status changed. Forgetting GeoIP stats.");
|
||||||
geoip_remove_old_clients(time(NULL)+3600);
|
geoip_remove_old_clients(time(NULL)+(2*60*60));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options_transition_affects_workers(old_options, options)) {
|
if (options_transition_affects_workers(old_options, options)) {
|
||||||
|
|||||||
@@ -308,6 +308,9 @@ geoip_note_client_seen(geoip_client_action_t action,
|
|||||||
if (action == GEOIP_CLIENT_CONNECT) {
|
if (action == GEOIP_CLIENT_CONNECT) {
|
||||||
if (!(options->BridgeRelay && options->BridgeRecordUsageByCountry))
|
if (!(options->BridgeRelay && options->BridgeRecordUsageByCountry))
|
||||||
return;
|
return;
|
||||||
|
/* Did we recently switch from bridge to relay or back? */
|
||||||
|
if (client_history_starts > now)
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
#ifndef ENABLE_GEOIP_STATS
|
#ifndef ENABLE_GEOIP_STATS
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user