aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2010-08-20 07:39:03 +0200
committerSebastian Hahn <sebastian@torproject.org>2010-08-20 23:45:00 +0200
commit33ae3f4b5c5bffd8ab6fae34f90b0bd5b0fa0ce5 (patch)
tree7787ce6c4f82f74f9417621c5c0e380d1b2483be /src/or
parent34551cda6f699cee5816a5935b56787ccb7b8f67 (diff)
downloadtor-33ae3f4b5c5bffd8ab6fae34f90b0bd5b0fa0ce5.tar
tor-33ae3f4b5c5bffd8ab6fae34f90b0bd5b0fa0ce5.tar.gz
Allow clients to use relays as bridges
Diffstat (limited to 'src/or')
-rw-r--r--src/or/routerlist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 8808f56db..c393e0768 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -3159,8 +3159,10 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg,
/* If we have this descriptor already and the new descriptor is a bridge
* descriptor, replace it. If we had a bridge descriptor before and the
* new one is not a bridge descriptor, don't replace it. */
- if (old_router && (!routerinfo_is_a_configured_bridge(router) ||
- routerinfo_is_a_configured_bridge(old_router))) {
+ tor_assert(old_router);
+ if (! (routerinfo_is_a_configured_bridge(router) &&
+ (router->purpose == ROUTER_PURPOSE_BRIDGE ||
+ old_router->purpose != ROUTER_PURPOSE_BRIDGE))) {
log_info(LD_DIR,
"Dropping descriptor that we already have for router '%s'",
router->nickname);