commit 0f50f5f3732354566eb6557b55765bea60a6e3be Author: George Kadianakis desnacked@riseup.net Date: Sat Sep 6 14:37:41 2014 +0300
Evaluate TestingDirAuthVoteGuard only after filling all rs elements. --- changes/bug13064 | 3 +++ src/or/dirserv.c | 13 ++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/changes/bug13064 b/changes/bug13064 new file mode 100644 index 0000000..c35b9a8 --- /dev/null +++ b/changes/bug13064 @@ -0,0 +1,3 @@ + o Minor bugfixes: + - Fix TestingDirAuthVoteGuard to properly give out Guard flags in + a testing network. Fixes bug 13064; bugfix on 0.2.5.2-alpha. diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 52258e8..17a7ad9 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2320,11 +2320,6 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs, } else { rs->is_possible_guard = 0; } - if (options->TestingTorNetwork && - routerset_contains_routerstatus(options->TestingDirAuthVoteGuard, - rs, 0)) { - rs->is_possible_guard = 1; - }
rs->is_bad_directory = listbaddirs && node->is_bad_directory; rs->is_bad_exit = listbadexits && node->is_bad_exit; @@ -2350,6 +2345,14 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs, tor_addr_copy(&rs->ipv6_addr, &ri->ipv6_addr); rs->ipv6_orport = ri->ipv6_orport; } + + /* Iff we are in a testing network, use TestingDirAuthVoteGuard to + give out Guard flags. */ + if (options->TestingTorNetwork && + routerset_contains_routerstatus(options->TestingDirAuthVoteGuard, + rs, 0)) { + rs->is_possible_guard = 1; + } }
/** Routerstatus <b>rs</b> is part of a group of routers that are on
tor-commits@lists.torproject.org