[tor-bugs] #22420 [Core Tor/Tor]: Mysterious "XXXX RD This is a bug, right?" comment from Nick

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun May 28 05:17:07 UTC 2017


#22420: Mysterious "XXXX RD This is a bug, right?" comment from Nick
------------------------------+------------------------------
     Reporter:  arma          |      Owner:
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: unspecified
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+------------------------------
 In circuit_package_relay_cell() we have this interesting stanza:
 {{{
     thishop = layer_hint;
     /* moving from farthest to nearest hop */
     do {
       tor_assert(thishop);
       /* XXXX RD This is a bug, right? */
       log_debug(LD_OR,"crypting a layer of the relay cell.");
       if (relay_crypt_one_payload(thishop->f_crypto, cell->payload, 1) <
 0) {
         return -1;
       }

       thishop = thishop->prev;
     } while (thishop != TO_ORIGIN_CIRCUIT(circ)->cpath->prev);
 }}}

 Despite the "RD", I think this is a comment written by Nick, intended for
 me.

 It arrived during commit 452f4cfa in Oct 2005, and actually there were two
 of those comments, though one of them got resolved by commit a312afd6 in
 May 2007.

 That leaves one, and it's a mystery to me. What is the bug?

 Maybe it's that relay_crypt_one_payload() can now only return 0, so
 checking its return value is dumb? That refactoring seems worth doing.
 (See also commit edd93f9d from Feb 2016.)

 Nick, do you have any guesses what you meant here?

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


More information about the tor-bugs mailing list