Opened 7 years ago

Closed 7 years ago

#9564 closed defect (fixed)

Bogus "return" in update_consensus_networkstatus_downloads()

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: 0.2.4.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-client tor-relay 023-backport
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


In update_consensus_networkstatus_downloads(), we consider, flavor-by-flavor, which networkstatus documents if any to download. If we decide not to download one, we should use "continue" to consider the next. Instead, in one place, we use return:

    if (time_to_download_next_consensus[i] > now)
      return; /* Wait until the current consensus is older. */

This can prevent a directory cache from fetching microdescriptor consensuses in a sufficiently timely way.

Child Tickets

Change History (3)

comment:1 Changed 7 years ago by nickm

Status: newneeds_review

Branch "bug9564" in my public repository applies cleanly to 0.2.3 and should apply cleanly later. Trivial but important fix. Please review.

comment:2 Changed 7 years ago by arma

Looks good to me, and I agree it's important.

comment:3 Changed 7 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Thank you! I've merged this to 0.2.3 and later.

Note: See TracTickets for help on using tickets.