summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-05-15 12:18:39 -0400
committerNick Mathewson <nickm@torproject.org>2011-05-15 12:18:39 -0400
commit1f7b9e61ce3da7f19bdb44d4a9c5ec33da4cf083 (patch)
treee7745fae63c0315bfdfce59959a125e1250971cc /src/or/directory.c
parent37e3fb8af20b02f764d0993218ed6025448073dd (diff)
parent69ff26b05c789e556c3e1401f5065ebf5e49c9d8 (diff)
downloadtor-1f7b9e61ce3da7f19bdb44d4a9c5ec33da4cf083.tar.gz
tor-1f7b9e61ce3da7f19bdb44d4a9c5ec33da4cf083.zip
Merge remote-tracking branch 'origin/maint-0.2.2'
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index c0378a419f..e62c2f3f0f 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -289,6 +289,8 @@ directory_post_to_dirservers(uint8_t dir_purpose, uint8_t router_purpose,
int post_via_tor;
smartlist_t *dirservers = router_get_trusted_dir_servers();
int found = 0;
+ const int exclude_self = (dir_purpose == DIR_PURPOSE_UPLOAD_VOTE ||
+ dir_purpose == DIR_PURPOSE_UPLOAD_SIGNATURES);
tor_assert(dirservers);
/* This tries dirservers which we believe to be down, but ultimately, that's
* harmless, and we may as well err on the side of getting things uploaded.
@@ -301,6 +303,9 @@ directory_post_to_dirservers(uint8_t dir_purpose, uint8_t router_purpose,
if ((type & ds->type) == 0)
continue;
+ if (exclude_self && router_digest_is_me(ds->digest))
+ continue;
+
if (options->ExcludeNodes && options->StrictNodes &&
routerset_contains_routerstatus(options->ExcludeNodes, rs, -1)) {
log_warn(LD_DIR, "Wanted to contact authority '%s' for %s, but "