summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2014-09-06 14:37:41 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2014-09-06 14:37:41 +0300
commit0f50f5f3732354566eb6557b55765bea60a6e3be (patch)
treebdbdc3cbe3e244cab8a698e6ae8e3e6e7c7c6ad3 /src/or
parent00ffccd9a6d9b7f484c2e421be33aea3975a2879 (diff)
downloadtor-0f50f5f3732354566eb6557b55765bea60a6e3be.tar.gz
tor-0f50f5f3732354566eb6557b55765bea60a6e3be.zip
Evaluate TestingDirAuthVoteGuard only after filling all rs elements.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/dirserv.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 52258e875f..17a7ad962e 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