diff options
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 2bdbaf23f8..b16847e62e 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -73,13 +73,14 @@ int router_reload_router_list(void) * in our routerlist, set all the authoritative ones as running again, * and pick one. If there are no dirservers at all in our routerlist, * reload the routerlist and try one last time. */ -routerinfo_t *router_pick_directory_server(int requireothers) { +routerinfo_t *router_pick_directory_server(int requireothers, + int fascistfirewall) { routerinfo_t *choice; if (!routerlist) return NULL; - choice = router_pick_directory_server_impl(requireothers, options.FascistFirewall); + choice = router_pick_directory_server_impl(requireothers, fascistfirewall); if(choice) return choice; @@ -87,7 +88,7 @@ routerinfo_t *router_pick_directory_server(int requireothers) { /* mark all authdirservers as up again */ mark_all_trusteddirservers_up(); /* try again */ - choice = router_pick_directory_server_impl(requireothers, options.FascistFirewall); + choice = router_pick_directory_server_impl(requireothers, fascistfirewall); if(choice) return choice; @@ -103,11 +104,11 @@ routerinfo_t *router_pick_directory_server(int requireothers) { return choice; } -trusted_dir_server_t *router_pick_trusteddirserver(int requireothers) { +trusted_dir_server_t *router_pick_trusteddirserver(int requireothers, + int fascistfirewall) { trusted_dir_server_t *choice; - choice = router_pick_trusteddirserver_impl(requireothers, - options.FascistFirewall); + choice = router_pick_trusteddirserver_impl(requireothers, fascistfirewall); if(choice) return choice; @@ -115,7 +116,7 @@ trusted_dir_server_t *router_pick_trusteddirserver(int requireothers) { /* mark all authdirservers as up again */ mark_all_trusteddirservers_up(); /* try again */ - choice = router_pick_trusteddirserver_impl(requireothers, 0); + choice = router_pick_trusteddirserver_impl(requireothers, fascistfirewall); if(choice) return choice; @@ -145,6 +146,9 @@ router_pick_directory_server_impl(int requireothers, int fascistfirewall) if(!routerlist) return NULL; + if(options.HttpProxy) + fascistfirewall = 0; + /* Find all the running dirservers we know about. */ sl = smartlist_create(); for(i=0;i< smartlist_len(routerlist->routers); i++) { @@ -179,6 +183,9 @@ router_pick_trusteddirserver_impl(int requireother, int fascistfirewall) if (!trusted_dir_servers) return NULL; + if(options.HttpProxy) + fascistfirewall = 0; + SMARTLIST_FOREACH(trusted_dir_servers, trusted_dir_server_t *, d, { if (!d->is_running) continue; |