bugfix: router_exit_policy_rejects_all() was broken, so we were

sometimes picking middleman nodes as our last hop, which wasn't
very useful.


svn:r3075
This commit is contained in:
Roger Dingledine 2004-12-04 08:56:59 +00:00
parent 2532e9405e
commit 52676364b9
2 changed files with 2 additions and 2 deletions

View File

@ -294,7 +294,7 @@ void rep_hist_dump_stats(time_t now, int severity)
upt, upt+downt, uptime*100.0); upt, upt+downt, uptime*100.0);
if (!strmap_isempty(or_history->link_history_map)) { if (!strmap_isempty(or_history->link_history_map)) {
strlcpy(buffer, " Good extend attempts: ", sizeof(buffer)); strlcpy(buffer, " Extend attempts: ", sizeof(buffer));
len = strlen(buffer); len = strlen(buffer);
for (lhist_it = strmap_iter_init(or_history->link_history_map); for (lhist_it = strmap_iter_init(or_history->link_history_map);
!strmap_iter_done(lhist_it); !strmap_iter_done(lhist_it);

View File

@ -1020,7 +1020,7 @@ int router_exit_policy_all_routers_reject(uint32_t addr, uint16_t port) {
/** Return true iff <b>router</b> does not permit exit streams. /** Return true iff <b>router</b> does not permit exit streams.
*/ */
int router_exit_policy_rejects_all(routerinfo_t *router) { int router_exit_policy_rejects_all(routerinfo_t *router) {
return router_compare_addr_to_addr_policy(0, 0, router->exit_policy) return router_compare_addr_to_addr_policy(0, 1, router->exit_policy)
== ADDR_POLICY_REJECTED; == ADDR_POLICY_REJECTED;
} }