[tor-bugs] #4361 [Tor Client]: Shouldn't the v3 client process the certs cell before sending her netinfo cell?

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Tue Nov 1 04:08:59 UTC 2011


#4361: Shouldn't the v3 client process the certs cell before sending her netinfo
cell?
------------------------+---------------------------------------------------
 Reporter:  arma        |          Owner:                    
     Type:  defect      |         Status:  new               
 Priority:  normal      |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client  |        Version:                    
 Keywords:              |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------

Comment(by arma):

 Frosty provides the following suggested patch:
 {{{
 commit d1e64818d24a6b73505fd2ce5daa6bc1c229220e
 Author: frosty <frosty at rootedker.nl>
 Date:   Tue Nov 1 04:49:20 2011 +0100

     Conforming spec

 diff --git a/src/or/command.c b/src/or/command.c
 index c4cc3a9..868a743 100644
 --- a/src/or/command.c
 +++ b/src/or/command.c
 @@ -673,8 +673,7 @@ command_process_versions_cell(var_cell_t *cell,
 or_connectio
      const int send_chall = !started_here &&
 public_server_mode(get_options());
      /* If our certs cell will authenticate us, or if we have no intention
 of
       * authenticating, send a netinfo cell right now. */
 -    const int send_netinfo =
 -      !(started_here && public_server_mode(get_options()));
 +    const int send_netinfo = !started_here;
      const int send_any =
        send_versions || send_certs || send_chall || send_netinfo;
      tor_assert(conn->link_proto >= 3);
 @@ -1006,6 +1005,13 @@ command_process_cert_cell(var_cell_t *cell,
 or_connection

      conn->handshake_state->id_cert = id_cert;
      id_cert = NULL;
 +    if (!public_server_mode(get_options())) {
 +      if (connection_or_send_netinfo(conn) < 0) {
 +        log_warn(LD_OR, "Couldn't send netinfo cell");
 +        connection_mark_for_close(TO_CONN(conn));
 +        goto err;
 +      }
 +    }
    } else {
      if (! (id_cert && auth_cert))
        ERR("The certs we wanted were missing");
 }}}

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


More information about the tor-bugs mailing list