aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-02-14 12:06:59 -0500
committerNick Mathewson <nickm@torproject.org>2013-02-14 12:06:59 -0500
commit1070a720ad7f45fa82b77be0512056a06e535b72 (patch)
tree2ff76f12390f5f7c88b1b62080ebe73b5e58873c /src/or/or.h
parent91027218e29090b18d42e1868367cc2a9e149900 (diff)
downloadtor-1070a720ad7f45fa82b77be0512056a06e535b72.tar.gz
tor-1070a720ad7f45fa82b77be0512056a06e535b72.zip
Be more robust when excluding existing nodes as new dirguards
In addition to rejecting them post-hoc, avoid picking them in the first place. This makes us less likely to decide that we can't add guards at all.
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h
index df69674d34..1cb9ef2f0e 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -4760,6 +4760,10 @@ typedef struct dir_server_t {
#define PDS_NO_EXISTING_SERVERDESC_FETCH (1<<3)
#define PDS_NO_EXISTING_MICRODESC_FETCH (1<<4)
+/** This node is to be chosen as a directory guard, so don't choose any
+ * node that's currently a guard. */
+#define PDS_FOR_GUARD (1<<5)
+
#define PDS_PREFER_TUNNELED_DIR_CONNS_ (1<<16)
/** Possible ways to weight routers when choosing one randomly. See