[tor-dev] Question about HS code
michael at briarproject.org
Tue May 27 13:25:09 UTC 2014
-----BEGIN PGP SIGNED MESSAGE-----
I've been trying to get to grips with the hidden service code, and I
have a question that I was hoping someone on the list could answer.
The constant REND_HID_SERV_DIR_REQUERY_PERIOD is defined as 15 * 60
(15 minutes) in rendclient.c, with the comment "The period for which a
hidden service directory cannot be queried for the same descriptor ID
again." As far as I can tell, the purpose of this constant is to
prevent a client from repeatedly asking an HS directory for a
descriptor that the directory doesn't have.
However, when a descriptor fetch fails and there's no reusable cached
descriptor, rend_client_desc_trynow(query) calls
rend_client_note_connection_attempt_ended(onion_address), which calls
purge_hid_serv_from_last_hid_serv_requests(onion_address), which (as
far as I can tell) forgets which HS directories have been tried for
the descriptor, allowing the same directories to be tried again before
So what's the effect of REND_HID_SERV_DIR_REQUERY_PERIOD?
Thanks for any guidance,
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the tor-dev