prevent picking middleman nodes as the last node in the circuit

svn:r1088
This commit is contained in:
Roger Dingledine 2004-02-17 06:39:20 +00:00
parent 51ca94fef3
commit 1801bd7592
2 changed files with 2 additions and 2 deletions

View File

@ -455,7 +455,7 @@ int router_dump_router_to_string(char *s, int maxlen, routerinfo_t *router,
return -1; return -1;
written += result; written += result;
} }
if (tmpe->prt_min == 1 && tmpe->prt_max == 65535) { if (tmpe->prt_min == 0 && tmpe->prt_max == 65535) {
if (written > maxlen-4) if (written > maxlen-4)
return -1; return -1;
strcat(s+written, ":*\n"); strcat(s+written, ":*\n");

View File

@ -955,7 +955,7 @@ static int router_add_exit_policy(routerinfo_t *router,
} }
} }
if (!port || strcmp(port, "*") == 0) { if (!port || strcmp(port, "*") == 0) {
newe->prt_min = 1; newe->prt_min = 0;
newe->prt_max = 65535; newe->prt_max = 65535;
} else { } else {
endptr = NULL; endptr = NULL;