[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #24110 [Core Tor/Tor]: NS_CONTROL_PORT formats change when using microdescriptors
#24110: NS_CONTROL_PORT formats change when using microdescriptors
--------------------------+------------------------------------
Reporter: teor | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone: Tor: 0.3.3.x-final
Component: Core Tor/Tor | Version: Tor: 0.3.0.1-alpha
Severity: Normal | Resolution:
Keywords: bwauth-needs | Actual Points:
Parent ID: | Points: 1
Reviewer: | Sponsor:
--------------------------+------------------------------------
Comment (by catalyst):
Replying to [comment:9 atagar]:
> Gotcha. So just to be clear tor does the following?
>
> {{{
> if 'GETCONF FetchUselessDescriptors' == '1' or 'GETCONF
UseMicrodescriptors' == '0'
> return plain router status entries for 'GETINFO ns/all'
> else
> return mirodescriptor router status entries for 'GETINFO ns/all'
> }}}
It's not quite that. I think it always returns NS-flavored `r` lines,
except with truncated descriptor digests if tor is using microdescriptors.
See [https://gitweb.torproject.org/tor.git/tree/src/or/dirserv.c#n1929
this part] of dirserv.c, and note that any call that comes from control.c
passes `NS_CONTROL_PORT` for `format`, so the `r` line always gets output
in the NS flavor format (8 components including the `r`), but if tor is
using microdescriptors, it'll be a truncated microdescriptor digest
instead of a full descriptor digest. It looks like
[https://gitweb.torproject.org/stem.git/tree/stem/control.py#n1951 stem]
doesn't check for `auto`, so it defaults to expecting the 8-component
form, which happens to work unless someone explicitly set
`UseMicroDescriptors=1` for some reason.
Maybe the "right" thing to do is have the control protocol return whatever
`r` line format corresponds to the consensus flavor it's using, but that
might break existing applications that expect the current "wrong"
behavior.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24110#comment:10>
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