summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2011-03-14 15:52:53 -0400
committerRoger Dingledine <arma@torproject.org>2011-03-14 15:52:53 -0400
commitcb101c48155729fa05cef2f255d1de0ad40d6b72 (patch)
tree5798ebe6e8c45dc206f8aec944568399216f6436
parent7d2a91f5e5aee77544115089ef79d14cb3e8093e (diff)
parent72b89c96bff877b5097c5e831d5469086d28c24c (diff)
downloadtor-cb101c48155729fa05cef2f255d1de0ad40d6b72.tar.gz
tor-cb101c48155729fa05cef2f255d1de0ad40d6b72.zip
Merge branch 'bug2511' into bug2510
-rw-r--r--src/or/or.h1
-rw-r--r--src/or/routerlist.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 752de219ef..e899f60cbf 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -3499,6 +3499,7 @@ typedef enum was_router_added_t {
ROUTER_NOT_IN_CONSENSUS = -3,
ROUTER_NOT_IN_CONSENSUS_OR_NETWORKSTATUS = -4,
ROUTER_AUTHDIR_REJECTS = -5,
+ ROUTER_WAS_NOT_WANTED = -6
} was_router_added_t;
/********************************* routerparse.c ************************/
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index bbd08f39ef..4421d5cf81 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -3209,7 +3209,8 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg,
int from_cache, int from_fetch)
{
const char *id_digest;
- int authdir = authdir_mode_handles_descs(get_options(), router->purpose);
+ or_options_t *options = get_options();
+ int authdir = authdir_mode_handles_descs(options, router->purpose);
int authdir_believes_valid = 0;
routerinfo_t *old_router;
networkstatus_t *consensus = networkstatus_get_latest_consensus();
@@ -3319,12 +3320,13 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg,
* descriptor. Otherwise we could end up using it as one of our entry
* guards even if it isn't in our Bridge config lines. */
if (router->purpose == ROUTER_PURPOSE_BRIDGE && from_cache &&
+ !authdir_mode_bridge(options) &&
!routerinfo_is_a_configured_bridge(router)) {
log_info(LD_DIR, "Dropping bridge descriptor for '%s' because we have "
"no bridge configured at that address.", router->nickname);
*msg = "Router descriptor was not a configured bridge.";
routerinfo_free(router);
- return ROUTER_WAS_NOT_NEW;
+ return ROUTER_WAS_NOT_WANTED;
}
/* If we have a router with the same identity key, choose the newer one. */