mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-09-20 20:23:03 +02:00
Merge commit 'origin/maint-0.2.1'
This commit is contained in:
commit
0e2618dd54
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@
|
|||||||
\#*\#
|
\#*\#
|
||||||
.#*
|
.#*
|
||||||
*~
|
*~
|
||||||
|
*.swp
|
||||||
# C stuff
|
# C stuff
|
||||||
*.o
|
*.o
|
||||||
# Diff droppings
|
# Diff droppings
|
||||||
|
@ -26,6 +26,10 @@ Changes in version 0.2.1.16-?? - 2009-??-??
|
|||||||
- Log correct error messages for DNS-related network errors on
|
- Log correct error messages for DNS-related network errors on
|
||||||
Windows.
|
Windows.
|
||||||
|
|
||||||
|
o Minor bugfixes (on 0.2.1.x):
|
||||||
|
- When switching back and forth between bridge mode, do not start
|
||||||
|
gathering GeoIP data until two hours have passed.
|
||||||
|
|
||||||
|
|
||||||
Changes in version 0.2.1.15-rc - 2009-05-25
|
Changes in version 0.2.1.15-rc - 2009-05-25
|
||||||
o Major bugfixes (on 0.2.0.x):
|
o Major bugfixes (on 0.2.0.x):
|
||||||
|
@ -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)) {
|
||||||
|
@ -310,6 +310,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;
|
||||||
@ -393,7 +396,10 @@ _remove_old_client_helper(struct clientmap_entry_t *ent, void *_cutoff)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Forget about all clients that haven't connected since <b>cutoff</b>. */
|
/** Forget about all clients that haven't connected since <b>cutoff</b>.
|
||||||
|
* If <b>cutoff</b> is in the future, clients won't be added to the history
|
||||||
|
* until this time is reached. This is useful to prevent relays that switch
|
||||||
|
* to bridges from reporting unbelievable numbers of clients. */
|
||||||
void
|
void
|
||||||
geoip_remove_old_clients(time_t cutoff)
|
geoip_remove_old_clients(time_t cutoff)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user