diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-05-16 11:47:13 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-05-16 11:47:13 -0400 |
commit | 3f55b76360e849fcb6e7f4af7f21be3583c97dc9 (patch) | |
tree | c252072e102bf8ad68224f4496a5d837f2bae4d9 | |
parent | 70ffd3bc20d2ab4ce9e3f4e57b3728e644d584ce (diff) | |
parent | 7c8032c22ba6270444d84604f33509a892293fcc (diff) | |
download | tor-3f55b76360e849fcb6e7f4af7f21be3583c97dc9.tar.gz tor-3f55b76360e849fcb6e7f4af7f21be3583c97dc9.zip |
Merge remote-tracking branch 'public/bug5139'
-rw-r--r-- | changes/bug5139 | 6 | ||||
-rw-r--r-- | src/or/router.c | 15 |
2 files changed, 15 insertions, 6 deletions
diff --git a/changes/bug5139 b/changes/bug5139 new file mode 100644 index 0000000000..5cebc76820 --- /dev/null +++ b/changes/bug5139 @@ -0,0 +1,6 @@ + o Minor features (bridges): + - Tag a bridge's descriptor as "never to be sent + unencrypted". This shouldn't matter, since bridges don't open + non-anonymous connections to the bridge authority and don't + allow unencrypted directory connections from clients, but we + might as well make sure. Closes bug 5139. diff --git a/src/or/router.c b/src/or/router.c index a967f0dc4b..34e231ae7c 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -1694,12 +1694,15 @@ router_rebuild_descriptor(int force) ri->purpose = options->BridgeRelay ? ROUTER_PURPOSE_BRIDGE : ROUTER_PURPOSE_GENERAL; - ri->cache_info.send_unencrypted = 1; - /* Let bridges serve their own descriptors unencrypted, so they can - * pass reachability testing. (If they want to be harder to notice, - * they can always leave the DirPort off). */ - if (ei && !options->BridgeRelay) - ei->cache_info.send_unencrypted = 1; + if (options->BridgeRelay) { + /* Bridges shouldn't be able to send their descriptors unencrypted, + anyway, since they don't have a DirPort, and always connect to the + bridge authority anonymously. But just in case they somehow think of + sending them on an unencrypted connection, don't allow them to try. */ + ri->cache_info.send_unencrypted = ei->cache_info.send_unencrypted = 0; + } else { + ri->cache_info.send_unencrypted = ei->cache_info.send_unencrypted = 1; + } router_get_router_hash(ri->cache_info.signed_descriptor_body, strlen(ri->cache_info.signed_descriptor_body), |