[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #9969 [Tor]: We launch 50 microdesc requests, spread out over just three guards?
#9969: We launch 50 microdesc requests, spread out over just three guards?
------------------------+--------------------------------
Reporter: arma | Owner:
Type: defect | Status: needs_revision
Priority: major | Milestone: Tor: 0.2.5.x-final
Component: Tor | Version:
Resolution: | Keywords: tor-client
Actual Points: | Parent ID:
Points: |
------------------------+--------------------------------
Comment (by arlolra):
Replying to [comment:7 nickm]:
> In dir_fetch_type:
> * I don't like those complicated conditional expressions. In
particular, every time I see something like the following, I need to go
look at a table of operator precedence. I think that in this case it is
wrong: bitwise OR binds more tightly than ?, so the result of the
conditional will always be "MICRODESC_DIRINFO"... but the problem here is
probably that conditional expressions are Just Too Error-Prone.
> {{{
> return V3_DIRINFO |
> (resource && !strcmp(resource,"microdesc") ?
MICRODESC_DIRINFO :
>
NO_DIRINFO);
> }}}
Ummm, no, the parentheses guard against the situation you described. But I
wholeheartedly agree that if you had to think about it, it's already too
complicated.
>
> In initiate_descriptor_downloads:
> * Changing from 8 to 4 seems wrong; you've left off the space for the
terminating NUL character.
I only counted 4 characters. "d/" + ".z"
The NULL terminator is accounted for when you backtrack to remove the last
separator, so is included in the +1 * n.
`memcpy(cp-1, ".z", 3);`
> * Why is the minimum ''higher'' now? We want to be launching fewer
requests. Two per guard still seems like a high minimum. This feels more
like a maximum than a minimum
Hmm, I thought that's what we had agreed on but I admit to being very
tired during that talk.
Thanks for reviewing. I'll take your questions back to the drawing board.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9969#comment:8>
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