diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-05-16 11:31:40 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-05-16 11:31:40 -0400 |
commit | 2cdd631f5ca93e8bed5ad741881d4b332a81ebc3 (patch) | |
tree | 294662435d1972293592aa1a828a8ca104882a77 | |
parent | 517b9c602a9e5e8c60849892a426526e803ef412 (diff) | |
parent | f89de0a79fe02727d40a051eba0e96f7324e68ab (diff) | |
download | tor-2cdd631f5ca93e8bed5ad741881d4b332a81ebc3.tar.gz tor-2cdd631f5ca93e8bed5ad741881d4b332a81ebc3.zip |
Merge branch 'bug5380'
-rw-r--r-- | changes/bug5380 | 5 | ||||
-rw-r--r-- | src/or/circuitbuild.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/changes/bug5380 b/changes/bug5380 new file mode 100644 index 0000000000..4bb17bc940 --- /dev/null +++ b/changes/bug5380 @@ -0,0 +1,5 @@ + o Minor bugfixes: + - Check our entry guards for having been picked too long ago when + we get a new consensus. (Previously, we only did this check at + startup, which could lead to us holding a guard indefinitely, + and give weird results.) Fixes bug 5380; bugfix on 0.2.1.14-rc. diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 3b82ed7455..403f65f284 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -3737,7 +3737,9 @@ entry_guard_free(entry_guard_t *e) /** Remove any entry guard which was selected by an unknown version of Tor, * or which was selected by a version of Tor that's known to select - * entry guards badly. */ + * entry guards badly, or which was selected more 2 months ago. */ +/* XXXX The "obsolete guards" and "chosen long ago guards" things should + * probably be different functions. */ static int remove_obsolete_entry_guards(time_t now) { @@ -3866,6 +3868,8 @@ entry_guards_compute_status(const or_options_t *options, time_t now) if (remove_dead_entry_guards(now)) changed = 1; + if (remove_obsolete_entry_guards(now)) + changed = 1; if (changed) { SMARTLIST_FOREACH_BEGIN(entry_guards, entry_guard_t *, entry) { |