mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Fix a rare assert trigger, where routerinfos for entries in our cpath
would expire while we're building the path. Thanks to Eugene Armstead for pointing it out. svn:r2402
This commit is contained in:
parent
136d4e5739
commit
eff780c815
@ -1083,10 +1083,10 @@ static routerinfo_t *choose_good_middle_server(cpath_build_state_t *state,
|
|||||||
routerlist_add_friends(excluded, r);
|
routerlist_add_friends(excluded, r);
|
||||||
}
|
}
|
||||||
for (i = 0, cpath = head; i < cur_len; ++i, cpath=cpath->next) {
|
for (i = 0, cpath = head; i < cur_len; ++i, cpath=cpath->next) {
|
||||||
r = router_get_by_digest(cpath->identity_digest);
|
if((r = router_get_by_digest(cpath->identity_digest))) {
|
||||||
tor_assert(r);
|
smartlist_add(excluded, r);
|
||||||
smartlist_add(excluded, r);
|
routerlist_add_friends(excluded, r);
|
||||||
routerlist_add_friends(excluded, r);
|
}
|
||||||
}
|
}
|
||||||
choice = router_choose_random_node("", options.ExcludeNodes, excluded,
|
choice = router_choose_random_node("", options.ExcludeNodes, excluded,
|
||||||
0, 1, options._AllowUnverified & ALLOW_UNVERIFIED_MIDDLE, 0);
|
0, 1, options._AllowUnverified & ALLOW_UNVERIFIED_MIDDLE, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user