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

[tor-bugs] Re: #968 [Tor - Relay]: Directory authority in private Tor network doesn't publish consensus



#968: Directory authority in private Tor network doesn't publish consensus
--------------------------+-------------------------------------------------
  Reporter:  karsten      |       Owner:  karsten       
      Type:  defect       |      Status:  new           
  Priority:  minor        |   Milestone:                
 Component:  Tor - Relay  |     Version:  0.2.1.13-alpha
Resolution:  None         |    Keywords:                
    Parent:               |  
--------------------------+-------------------------------------------------

Old description:

> Under certain circumstances a single directory authority in a private Tor
> network does not manage to publish a consensus. For some reason the
> directory adds itself to the list of trusted directory authorities
> *twice*.
> The result is that it thinks there are 2 directories and that a single
> vote is not enough to publish a consensus.
>
> The directory triggers the following warning:
>
> Index: src/or/routerlist.c
> ===================================================================
> --- src/or/routerlist.c (revision 19258)
> +++ src/or/routerlist.c (working copy)
> @@ -3706,6 +3706,18 @@
>      hostname = tor_strdup(address);
>    }
>
> +  SMARTLIST_FOREACH(trusted_dir_servers, trusted_dir_server_t *, ent, {
> +    if (ent->v3_identity_digest &&
> +        !memcmp(v3_auth_digest, ent->v3_identity_digest, DIGEST_LEN))
> +      log_warn(LD_CONFIG, "We already have a directory with the same "
> +               "v3 identity digest %s, address %s, OR port %d, and Dir
> port %d. "
> +               "Now we try to add one with address %s, OR port %d, and
> Dir port %d. "
> +               "Something is wrong here!",
> +               hex_str(ent->v3_identity_digest, DIGEST_LEN),
> +               ent->address, ent->or_port, ent->dir_port,
> +               hostname, or_port, dir_port);
> +  });
> +
>    ent = tor_malloc_zero(sizeof(trusted_dir_server_t));
>    ent->nickname = nickname ? tor_strdup(nickname) : NULL;
>    ent->address = hostname;
>

> A workaround is to add a return statement to that loop. But it would be
> better to find out why the directory adds itself to the list twice.
>

> [Automatically added by flyspray2trac: Operating System: All]

New description:

 Under certain circumstances a single directory authority in a private Tor
 network does not manage to publish a consensus. For some reason the
 directory adds itself to the list of trusted directory authorities
 *twice*.
 The result is that it thinks there are 2 directories and that a single
 vote is not enough to publish a consensus.

 The directory triggers the following warning:

 Index: src/or/routerlist.c
 ===================================================================
 --- src/or/routerlist.c (revision 19258)
 +++ src/or/routerlist.c (working copy)
 @@ -3706,6 +3706,18 @@
      hostname = tor_strdup(address);
    }

 +  SMARTLIST_FOREACH(trusted_dir_servers, trusted_dir_server_t *, ent, {
 +    if (ent->v3_identity_digest &&
 +        !memcmp(v3_auth_digest, ent->v3_identity_digest, DIGEST_LEN))
 +      log_warn(LD_CONFIG, "We already have a directory with the same "
 +               "v3 identity digest %s, address %s, OR port %d, and Dir
 port %d. "
 +               "Now we try to add one with address %s, OR port %d, and
 Dir port %d. "
 +               "Something is wrong here!",
 +               hex_str(ent->v3_identity_digest, DIGEST_LEN),
 +               ent->address, ent->or_port, ent->dir_port,
 +               hostname, or_port, dir_port);
 +  });
 +
    ent = tor_malloc_zero(sizeof(trusted_dir_server_t));
    ent->nickname = nickname ? tor_strdup(nickname) : NULL;
    ent->address = hostname;


 A workaround is to add a return statement to that loop. But it would be
 better to find out why the directory adds itself to the list twice.


 [Automatically added by flyspray2trac: Operating System: All]

--

Comment(by karsten):

 I didn't encounter this problem again, nor do I know off the top of my
 head how to reproduce the problem.

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