[tor-bugs] #5044 [Tor Relay]: Mismatch between dir-spec.txt and routerparse.c

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Wed Feb 8 08:12:01 UTC 2012


#5044: Mismatch between dir-spec.txt and routerparse.c
-----------------------+----------------------------------------------------
 Reporter:  karsten    |          Owner:     
     Type:  defect     |         Status:  new
 Priority:  normal     |      Milestone:     
Component:  Tor Relay  |        Version:     
 Keywords:             |         Parent:     
   Points:             |   Actualpoints:     
-----------------------+----------------------------------------------------

Comment(by arma):

 Replying to [ticket:5044 karsten]:
 >  - `protocols` lines are specified in dir-spec.txt and written to server
 descriptors, but they are not parsed in routerparse.c.

 I think that's fine. We'll parse them once we care what they say. (And
 we'll want them to be there for the current versions, once new versions
 say something different, so we can tell the difference.)

 >  - `consensus-method` lines are specified as "Exactly once for
 consensuses" but implemented using the `T01` macro in routerparse.c.

 I could go either way here. Looks like a missing value means consensus
 method 1. We're way past consensus method one now -- we'll never use that.
 So maybe T1 is slightly better.

 >  - `contact` lines are specified as "At most once" for votes and
 authority sections of consensuses, but are implemented using the `T1` and
 `T1N` macro in routerparse.c.

 I'm fine making these optional. Note that authorities are required to set
 ContactInfo (see config.c). But we can look it up in their relay if we're
 confused -- so long as we don't do Sebastian's plan of having authorities
 not be relays from #3023, that is.

 >  - `legacy-key-dir` lines are specified as `legacy-key` in dir-spec.txt.

 And it would appear they are 'legacy-dir-key' in the code? This is a case
 where we should fix the spec to match the code.

 >  - `s` lines are specified as "At most once" in dir-spec.txt, but are
 implemented using the `T1` macro in routerparse.c.

 A few months ago I wrote some comment on some trac ticket expressing
 concern that missing the s line would make parsing harder or riskier in
 some way. I wonder what that was.

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


More information about the tor-bugs mailing list