[tor-bugs] #9380 [BridgeDB]: BridgeDB should use stem for parsing descriptors according to torspec

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Aug 27 11:49:03 UTC 2014


#9380: BridgeDB should use stem for parsing descriptors according to torspec
-------------------------+-------------------------------------------------
     Reporter:  sysrqb   |      Owner:  isis
         Type:           |     Status:  needs_review
  enhancement            |  Milestone:
     Priority:  normal   |    Version:
    Component:           |   Keywords:  stem,bridgedb-0.2.x,bridgedb-
  BridgeDB               |  parsers
   Resolution:           |  Parent ID:
Actual Points:           |
       Points:           |
-------------------------+-------------------------------------------------

Comment (by isis):

 Replying to [comment:24 joelanders]:
 > Cool, cool, thanks! I shoulda mentioned I hadn't run the existing tests
 on this new code. Just sketching the outline, mostly. Figuring out where
 to put things and stuff.
 >
 > I've run into the specs vs. implementation tension a bit. Stem's
 RouterStatusEntryV2 doesn't have the or_addresses attribute (corresponding
 to the "a line" in the network status document. V3 does? Also, I think
 these or_addresses can have a "portlist" (as called in dir-spec.txt) as
 opposed to just an integer.

 I think both you and Damian are correct; this would be one of the
 instances where `stem.descriptor.router_status_entry.RouterStatusEntryV3`
 would work better, as it has an `or_addresses` attribute which would
 contain the IPv6 addresses from a bridge networkstatus `"a"`-line. We'll
 need to switch to using `router_status_entry._parse_file()` as Damian
 suggests.

 About the portlist for IPv6 addresses in one of these lines... I'm
 actually not sure what the spec says. In practice, I only recall seeing
 one IPv6 address and one port to go with it, but that doesn't mean it
 couldn't be otherwise. You might have to look at tor's source to determine
 what's allowed.

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


More information about the tor-bugs mailing list