diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-09-09 12:26:16 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-09-09 12:26:16 -0400 |
commit | 8e3939519999f73fadad1a8b8cff75aad0667312 (patch) | |
tree | d5c7f56cd8ce4076f04146f21d98f3ba330287e7 /src/or/dirserv.c | |
parent | 40b7dfaed2714d727c1e6bcead96cb798b14dffa (diff) | |
parent | 0f50f5f3732354566eb6557b55765bea60a6e3be (diff) | |
download | tor-8e3939519999f73fadad1a8b8cff75aad0667312.tar.gz tor-8e3939519999f73fadad1a8b8cff75aad0667312.zip |
Merge remote-tracking branch 'asn/bug13064'
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 92d34e2df7..1139dc1713 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2142,11 +2142,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_exit = listbadexits && node->is_bad_exit; node->is_hs_dir = dirserv_thinks_router_is_hs_dir(ri, node, now); @@ -2170,6 +2165,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 |