[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #24031 [Core Tor/Tor]: Protover.rs could use a better algorithm



#24031: Protover.rs could use a better algorithm
-------------------------------------------------+-------------------------
 Reporter:  nickm                                |          Owner:  isis
     Type:  defect                               |         Status:
                                                 |  needs_review
 Priority:  Very High                            |      Milestone:  Tor:
                                                 |  0.3.3.x-final
Component:  Core Tor/Tor                         |        Version:  Tor:
                                                 |  0.3.3.1-alpha
 Severity:  Normal                               |     Resolution:
 Keywords:  rust, 033-must, protover, security,  |  Actual Points:  5
  033-triage-20180326, 033-included-20180326     |
Parent ID:                                       |         Points:  1
 Reviewer:  nickm                                |        Sponsor:
                                                 |  SponsorM-can
-------------------------------------------------+-------------------------

Comment (by isis):

 Another thing that would be nice to have feedback on is that this unittest
 [https://travis-ci.org/isislovecruft/tor/jobs/358551582#L3798 fails],
 intentionally, because I interpreted the spec differently to the C
 implementation:

 {{{
 ---- protover_all_supported_should_include_version_we_actually_do_support
 stdout ----
         thread
 'protover_all_supported_should_include_version_we_actually_do_support'
 panicked at 'assertion failed: `(left == right)`
   left: `"Link=6-999"`,
  right: `"Link=3-999"`', protover/tests/protover.rs:327:5
 }}}

 If a relay supports `"Link=1-5"`, and you ask it if it supports
 `"Link=3-999"` then the C code will return what's on the right, and the
 Rust returns what's on the left. (My reasoning was that if we actually
 support `"Link=3-5"`, then they shouldn't be in the set of unsupported
 things returned.)

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24031#comment:19>
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