[tor-bugs] #20593 [Core Tor/Tor]: Avoid resetting download status on 503
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Nov 7 14:27:07 UTC 2016
#20593: Avoid resetting download status on 503
------------------------------+--------------------------------
Reporter: nickm | Owner:
Type: defect | Status: new
Priority: Medium | Milestone: Tor: 0.2.9.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID: #20499
Points: | Reviewer:
Sponsor: |
------------------------------+--------------------------------
On comment:31:ticket:20499 , Teor notes:
>
> If we really do want every failure to result in a schedule increment, we
have to remove the following code:
>
> download_status_increment_failure:
> {{{
> /* only count the failure if it's permanent, or we're a server */
> if (status_code != 503 || server) {
> if (dls->n_download_failures < IMPOSSIBLE_TO_DOWNLOAD-1)
> ++dls->n_download_failures;
> }
> }}}
>
> Because combined with this code in download_status_schedule_get_delay,
it causes a reset on every 503:
> {{{
> /* Check if we missed a reset somehow */
> if (dls->last_backoff_position > dls_schedule_position) {
> dls->last_backoff_position = 0;
> dls->last_delay_used = 0;
> }
> }}}
>
> Which is exactly what we don't want when relays are busy - imagine
clients doing an automatic reset every time they DoS a relay...
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20593>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list