[tor-bugs] #14391 [Tor]: Refactor rend_cache_lookup_entry()

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Jan 26 22:44:34 UTC 2015


#14391: Refactor rend_cache_lookup_entry()
-------------------------+---------------------
 Reporter:  dgoulet      |          Owner:
     Type:  enhancement  |         Status:  new
 Priority:  normal       |      Milestone:
Component:  Tor          |        Version:
 Keywords:  tor-hs       |  Actual Points:
Parent ID:               |         Points:
-------------------------+---------------------
 Here is why {{{rend_cache_lookup_entry()}}} should be refactored:

 1) v0 descriptors are deprecated since 0.2.2.1 and not suppose to be alive
 in the network anymore. This function should only serve v2 version for now
 as the default.

 2) It should return different error code depending on what's the actual
 error is. Right now, there is no distinction between a cache entry not
 found and an invalid query.

 3) This function should NOT test if the intro points are usable or not.
 This adds some load on a function that should be "O(1)" and do one job.
 Furthermore, multiple callsites actually already test that doing twice the
 job...

 4) While adding control event, it would be useful to be able to lookup a
 cache entry without having it checking the intro points. There are also
 places in the code that do want to lookup the cache entry without doing
 that.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/14391>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list