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

Re: [tor-bugs] #27034 [Core Tor/Tor]: Clarification on 'GETINFO exit-policy/*'s valid 'non-transient internal errors'



#27034: Clarification on 'GETINFO exit-policy/*'s valid 'non-transient internal
errors'
--------------------------+------------------------
 Reporter:  atagar        |          Owner:  (none)
     Type:  defect        |         Status:  new
 Priority:  Low           |      Milestone:
Component:  Core Tor/Tor  |        Version:
 Severity:  Minor         |     Resolution:
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------

Comment (by rl1987):

 Hello atagar.

 Yes currently it is safe to assume that 552 indicate "not an onion
 router". At this point we have the following in router.c:

 {{{
  161 /** Return true if we expect given error to be transient.
  162  * Return false otherwise.
  163  */
  164 int
  165 routerinfo_err_is_transient(int err)
  166 {
  167   switch (err) {
  168     case TOR_ROUTERINFO_ERROR_NO_EXT_ADDR:
  169       return 1;
  170     case TOR_ROUTERINFO_ERROR_CANNOT_PARSE:
  171       return 1;
  172     case TOR_ROUTERINFO_ERROR_NOT_A_SERVER:
  173       return 0;
  174     case TOR_ROUTERINFO_ERROR_DIGEST_FAILED:
  175       return 0; // XXX: bug?
  176     case TOR_ROUTERINFO_ERROR_CANNOT_GENERATE:
  177       return 1;
  178     case TOR_ROUTERINFO_ERROR_DESC_REBUILDING:
  179       return 1;
  180   }
  181
  182   return 0;
  183 }
 }}}

 The only way to get `TOR_ROUTERINFO_ERROR_DIGEST_FAILED` is to fail
 computing identity key digest:

 {{{
 2362   ri->identity_pkey = crypto_pk_dup_key(get_server_identity_key());
 2363   if (crypto_pk_get_digest(ri->identity_pkey,
 2364                            ri->cache_info.identity_digest)<0) {
 2365     routerinfo_free(ri);
 2366     return TOR_ROUTERINFO_ERROR_DIGEST_FAILED;
 2367   }
 }}}

 This really should not happen, and if it does, it's probably a bug.

 Let me know if anything else should be done about this.

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