mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-03 00:53:32 +01:00
let an authdir that's not a naming authdir start even
if it doesn't have an approved-routers file. if it does, read it and parse it as usual. svn:r6182
This commit is contained in:
parent
4f14826cb3
commit
cf6ba3e76f
@ -996,8 +996,8 @@ new_route_len(double cw, uint8_t purpose, extend_info_t *exit,
|
|||||||
purpose != CIRCUIT_PURPOSE_S_ESTABLISH_INTRO)
|
purpose != CIRCUIT_PURPOSE_S_ESTABLISH_INTRO)
|
||||||
routelen++;
|
routelen++;
|
||||||
#endif
|
#endif
|
||||||
log_debug(LD_CIRC,"Chosen route length %d (%d routers available).",routelen,
|
log_debug(LD_CIRC,"Chosen route length %d (%d routers available).",
|
||||||
smartlist_len(routers));
|
routelen, smartlist_len(routers));
|
||||||
|
|
||||||
num_acceptable_routers = count_acceptable_routers(routers);
|
num_acceptable_routers = count_acceptable_routers(routers);
|
||||||
|
|
||||||
|
@ -173,8 +173,13 @@ dirserv_parse_fingerprint_file(const char *fname)
|
|||||||
|
|
||||||
cf = read_file_to_str(fname, 0);
|
cf = read_file_to_str(fname, 0);
|
||||||
if (!cf) {
|
if (!cf) {
|
||||||
log_warn(LD_FS, "Cannot open fingerprint file %s", fname);
|
if (get_options()->NamingAuthoritativeDir) {
|
||||||
|
log_warn(LD_FS, "Cannot open fingerprint file '%s'. Failing.", fname);
|
||||||
return -1;
|
return -1;
|
||||||
|
} else {
|
||||||
|
log_info(LD_FS, "Cannot open fingerprint file '%s'. Returning.", fname);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
result = config_get_lines(cf, &front);
|
result = config_get_lines(cf, &front);
|
||||||
tor_free(cf);
|
tor_free(cf);
|
||||||
|
@ -3245,7 +3245,7 @@ routers_update_status_from_networkstatus(smartlist_t *routers,
|
|||||||
router->is_named = rs->status.is_named;
|
router->is_named = rs->status.is_named;
|
||||||
|
|
||||||
if (!authdir) {
|
if (!authdir) {
|
||||||
/* If we're an authdir, don't believe others. */
|
/* If we're not an authdir, believe others. */
|
||||||
router->is_verified = rs->status.is_valid;
|
router->is_verified = rs->status.is_valid;
|
||||||
router->is_running = rs->status.is_running;
|
router->is_running = rs->status.is_running;
|
||||||
router->is_fast = rs->status.is_fast;
|
router->is_fast = rs->status.is_fast;
|
||||||
|
Loading…
Reference in New Issue
Block a user