Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #22420

Closed (moved)
(moved)
Open
Created May 28, 2017 by Roger Dingledine@arma

Mysterious "XXXX RD This is a bug, right?" comment from Nick

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?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking