[metrics-bugs] #30216 [Metrics/Library]: Add bandwidth file parser to metrics-lib

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Apr 23 12:33:43 UTC 2019


#30216: Add bandwidth file parser to metrics-lib
-------------------------------------------------+-------------------------
 Reporter:  irl                                  |          Owner:  karsten
     Type:  enhancement                          |         Status:
                                                 |  needs_revision
 Priority:  High                                 |      Milestone:
Component:  Metrics/Library                      |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-bwauth,tor-dirauth,metrics-      |  Actual Points:
  roadmap-2019-q2                                |
Parent ID:  #21378                               |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------
Changes (by irl):

 * status:  needs_review => needs_revision


Comment:

 {{{
       In version 1.0.0, Header List ends when the first relay bandwidth
       is found conforming to the next section.
 }}}

 but

 {{{
 switch (spaceSeparatedLineParts.length) {
 }}}

 is used to determine if you've reached the end of the headers. This should
 instead search the line for "bw=" as future header lines may contain
 spaces.

 {{{
       Additional header Lines MUST NOT use any keywords specified in the
       relay measurements format.
 }}}

 To be safer, it should be looking for either start of line or space
 preceeding bw=. In PCRE, `(^| )bw=`. This test should also be disabled if
 we've already seen a version declared that expects a terminator.

 When we are parsing country lists, ISO 2-alpha *can* be more than 2
 characters, and we're looking at using that functionality for describing
 CDNs in an extensible way in #30196. Codes will only be longer than 2
 characters if they start "OO".

 Tests and checks are OK.

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


More information about the metrics-bugs mailing list