diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-15 12:18:23 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-15 12:18:23 -0400 |
commit | 69ff26b05c789e556c3e1401f5065ebf5e49c9d8 (patch) | |
tree | 7ca8a5e07f87081e9890aa4a85cc0a63aeec78f9 /src/or/directory.c | |
parent | f2871009346e0589455be14e9cef930c19082c0a (diff) | |
parent | 6b83b3ba2aff4ba815241c76d712d149f13465e1 (diff) | |
download | tor-69ff26b05c789e556c3e1401f5065ebf5e49c9d8.tar.gz tor-69ff26b05c789e556c3e1401f5065ebf5e49c9d8.zip |
Merge branch 'bug3026' into maint-0.2.2
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 4c26671c70..347ed42cb8 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -279,6 +279,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. @@ -291,6 +293,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)) { log_warn(LD_DIR, "Wanted to contact authority '%s' for %s, but " |