mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-26 15:42:34 +01:00
Stop using published_on in rs to decide whether to download a routerdesc.
The consensus voters shouldn't actually include such old routers in the consensus anyway, so this logic shouldn't come up... but if a client _does_ download something it wouldn't use, it won't retry infinitely: see checks for WRA_NEVER_DOWNLOADABLE.
This commit is contained in:
parent
db7d067ab1
commit
08d452b38c
1 changed files with 1 additions and 4 deletions
|
@ -2615,15 +2615,12 @@ networkstatus_parse_flavor_name(const char *flavname)
|
||||||
int
|
int
|
||||||
client_would_use_router(const routerstatus_t *rs, time_t now)
|
client_would_use_router(const routerstatus_t *rs, time_t now)
|
||||||
{
|
{
|
||||||
|
(void) now;
|
||||||
if (!rs->is_flagged_running) {
|
if (!rs->is_flagged_running) {
|
||||||
/* If we had this router descriptor, we wouldn't even bother using it.
|
/* If we had this router descriptor, we wouldn't even bother using it.
|
||||||
* (Fetching and storing depends on by we_want_to_fetch_flavor().) */
|
* (Fetching and storing depends on by we_want_to_fetch_flavor().) */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (rs->published_on + OLD_ROUTER_DESC_MAX_AGE < now) {
|
|
||||||
/* We'd drop it immediately for being too old. */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (!routerstatus_version_supports_extend2_cells(rs, 1)) {
|
if (!routerstatus_version_supports_extend2_cells(rs, 1)) {
|
||||||
/* We'd ignore it because it doesn't support EXTEND2 cells.
|
/* We'd ignore it because it doesn't support EXTEND2 cells.
|
||||||
* If we don't know the version, download the descriptor so we can
|
* If we don't know the version, download the descriptor so we can
|
||||||
|
|
Loading…
Add table
Reference in a new issue