[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #20593 [Core Tor/Tor]: Avoid resetting download status on 503
#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs