aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@torproject.org>2013-10-07 09:28:44 +0200
committerLinus Nordberg <linus@torproject.org>2013-10-07 13:33:42 +0200
commitfab8fd2c18491440b37b71e140e23e6091bbbe32 (patch)
tree0f7c12555eb55061ad2dec59d65a742d95c2f67f /src/or/dirserv.c
parenta6b4934037d1308e91e12378b739a2742591a40d (diff)
downloadtor-fab8fd2c18491440b37b71e140e23e6091bbbe32.tar.gz
tor-fab8fd2c18491440b37b71e140e23e6091bbbe32.zip
Add TestingDirAuthVoteGuard option for specifying relays to vote Guard on.
Addresses ticket 9206.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 3243ac47c4..d30a474367 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -26,6 +26,7 @@
#include "router.h"
#include "routerlist.h"
#include "routerparse.h"
+#include "routerset.h"
/**
* \file dirserv.c
@@ -2705,6 +2706,11 @@ 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;