[tor-bugs] #25852 [Core Tor/Tor]: GETINFO exit-policy for tor client should return 551
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Apr 30 19:33:14 UTC 2018
#25852: GETINFO exit-policy for tor client should return 551
--------------------------------------------+------------------------------
Reporter: dmr | Owner: (none)
Type: defect | Status:
| needs_revision
Priority: Medium | Milestone: Tor:
| 0.3.4.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: tor-spec, tor-client, fast-fix | Actual Points:
Parent ID: | Points:
Reviewer: dgoulet | Sponsor:
--------------------------------------------+------------------------------
Comment (by dgoulet):
Replying to [comment:6 atagar]:
> Hi David, from a user perspective could we enumerate all the ways this
can fail? Presently I'm aware of two...
>
> 1. We're not a relay (no ORPort configured).
> 2. We haven't yet been able to resolve our externally facing address.
Any error path in `router_rebuild_descriptor()` basically. I see the
resolve issue you pointed out, then unable to digest a key (unlikely),
then we created a descriptor that we weren't able to parse. But more could
arise in the future with code change.
So what we need is probably a way to know what was the error if it ever
failed. I see two ways of doing it, maybe one is probably better than the
other,
a. Make `router_get_my_routerinfo()` return an error code with a NULL
descriptor. And then with that error code, we could get a human readable
string.
b. Have a global variable that keeps the error message explaining what
happened if something happened. And then the control port asks for this,
it could look at that value if a NULL value is returned to learn what
happened (considering we are in `server_mode()`).
c. <insert better idea> :)
>
> If we could have distinct error codes and descriptive messages for each
way this GETINFO command can fail that would be ideal.
Agree. Better informing the user is always better. But it gets a bit more
complicated if you try to enumerate all possible internal errors that tor
can have. So I think, for some errors, "Internal error" is fine and then
the tor logs should have the deets :).
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25852#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list