[tor-bugs] #14391 [Tor]: Refactor rend_cache_lookup_entry()
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue Jan 27 15:23:57 UTC 2015
#14391: Refactor rend_cache_lookup_entry()
-----------------------------+--------------------------------
Reporter: dgoulet | Owner:
Type: enhancement | Status: needs_review
Priority: normal | Milestone: Tor: 0.2.6.x-final
Component: Tor | Version:
Resolution: | Keywords: tor-hs
Actual Points: | Parent ID:
Points: |
-----------------------------+--------------------------------
Comment (by nickm):
Notes:
* If we're using the convention that a negative return value indicates
an error, we might want to add other negative values later on. So let's
have the callers of this function check for rend_cache_lookup_result < 0
as well? Similarly, when there's a switch(), you should handle the
`default:` case.
* This affects client behavior, and makes it so that if somebody _does_
serve a v0 descriptor, old clients will accept it but newer ones won't.
Generally, we don't worry about this kind of thing too much, but we should
consider if this is one of the times when we *do* care.
* The documentation for rend_cache_lookup_entry doesn't explain the
meanings of the different return values. It probably should.
* Yes, warn on version < 2.
* See the comment you removed about #997. Does that affect your
reasoning for item 3 above?
* I think that for robustness, we should set *e to NULL on all error
cases in rend_cache_lookup_entry, if e is not NULL.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/14391#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list