[tor-bugs] #22215 [Core Tor/Tor]: networkstatus_nickname_is_unnamed() can get ripped out

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed May 10 09:17:53 UTC 2017


#22215: networkstatus_nickname_is_unnamed() can get ripped out
------------------------------+-----------------
     Reporter:  arma          |      Owner:
         Type:  enhancement   |     Status:  new
     Priority:  Medium        |  Milestone:
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+-----------------
 {{{
   /* Is it marked as owned-by-someone-else? */
   if (networkstatus_nickname_is_unnamed(nickname)) {
     log_info(LD_GENERAL, "The name %s is listed as Unnamed: there is some
 "
              "router that holds it, but not one listed in the current "
              "consensus.", escaped(nickname));
     return NULL;
   }
 }}}

 The Unnamed flag is long gone from the world, now that proposal 235 has
 been merged. So we can simplify node_get_by_nickname() by getting rid of
 this function, plus the discussions about the Named flag.

 If we want to get adventuresome, I also see
 {{{
     int *named_flag; /* Index of the flag "Named" for votes[j] */
     int *unnamed_flag; /* Index of the flag "Unnamed" for votes[j] */
 }}}
 in networkstatus_compute_consensus(). And more generally,
 {{{
 $ grep Named *.c
 circuitbuild.c: * If <b>verbose_names</b> is false, give nicknames for
 Named routers and hex
 dirserv.c:/*                 1  Historically used to indicate Named */
 dirvote.c:    int *named_flag; /* Index of the flag "Named" for votes[j]
 */
 dirvote.c:        if (!strcmp(fl, "Named"))
 dirvote.c:    /* Named and Unnamed get treated specially */
 dirvote.c:        if (!strcmp(fl, "Named")) {
 networkstatus.c: * nickname, but the Named flag isn't set for that router.
 */
 nodelist.c: * nickname, but the Named flag isn't set for that router. */
 nodelist.c:                 "but none is listed as Named in the directory
 consensus. "
 routerparse.c:      else if (!strcmp(tok->args[i], "Named"))
 }}}

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


More information about the tor-bugs mailing list