diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2009-05-26 21:41:42 +0200 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2009-05-27 19:10:54 +0200 |
commit | 5f03d6c547629af73dea2cfdaf888bc3a7caab5d (patch) | |
tree | 0558ffe16650e29e671ddff2cf067bea53e73cae | |
parent | 031ce86cd4615c29c42a9c8dc344ab819ac91978 (diff) | |
download | tor-5f03d6c547629af73dea2cfdaf888bc3a7caab5d.tar.gz tor-5f03d6c547629af73dea2cfdaf888bc3a7caab5d.zip |
Fix bug 932 even more.
Ignore connections two hours after switching from bridge to relay or back.
-rw-r--r-- | src/or/config.c | 2 | ||||
-rw-r--r-- | src/or/geoip.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c index 25364b6a33..6030849a1c 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1331,7 +1331,7 @@ options_act(or_options_t *old_options) if (! bool_eq(options->BridgeRelay, old_options->BridgeRelay)) { 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)) { diff --git a/src/or/geoip.c b/src/or/geoip.c index eb0d7e43f4..e1477d4eab 100644 --- a/src/or/geoip.c +++ b/src/or/geoip.c @@ -308,6 +308,9 @@ geoip_note_client_seen(geoip_client_action_t action, if (action == GEOIP_CLIENT_CONNECT) { if (!(options->BridgeRelay && options->BridgeRecordUsageByCountry)) return; + /* Did we recently switch from bridge to relay or back? */ + if (client_history_starts > now) + return; } else { #ifndef ENABLE_GEOIP_STATS return; |