[or-cvs] make rend apconn send to the right cpath layer

Roger Dingledine arma at seul.org
Mon Apr 5 22:01:37 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	circuit.c command.c rendclient.c 
Log Message:
make rend apconn send to the right cpath layer

and fix circuit_log_path to know about rend circs


Index: circuit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuit.c,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -d -r1.183 -r1.184
--- circuit.c	5 Apr 2004 20:53:04 -0000	1.183
+++ circuit.c	5 Apr 2004 22:01:35 -0000	1.184
@@ -944,7 +944,11 @@
       snprintf(s, sizeof(buf) - (s - buf), "%s(%s) ",
                router->nickname, states[hop->state]);
     } else {
-      snprintf(s, sizeof(buf) - (s - buf), "UNKNOWN ");
+      if(circ->purpose == CIRCUIT_PURPOSE_C_REND_JOINED) {
+        snprintf(s, sizeof(buf) - (s - buf), "(rend join)");
+      } else {
+        snprintf(s, sizeof(buf) - (s - buf), "UNKNOWN ");
+      }
     }
     hop=hop->next;
   } while(hop!=circ->cpath);

Index: command.c
===================================================================
RCS file: /home/or/cvsroot/src/or/command.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- command.c	2 Apr 2004 23:30:53 -0000	1.56
+++ command.c	5 Apr 2004 22:01:35 -0000	1.57
@@ -193,7 +193,7 @@
     return;
   }
 
-  log_fn(LOG_DEBUG,"Received for circID %d.",cell->circ_id);
+  log_fn(LOG_INFO,"Received for circID %d.",cell->circ_id);
   if(circ->state == CIRCUIT_STATE_ONIONSKIN_PENDING) {
     onion_pending_remove(circ);
   }

Index: rendclient.c
===================================================================
RCS file: /home/or/cvsroot/src/or/rendclient.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- rendclient.c	5 Apr 2004 21:39:18 -0000	1.17
+++ rendclient.c	5 Apr 2004 22:01:35 -0000	1.18
@@ -163,8 +163,6 @@
   connection_t *apconn;
   crypt_path_t *hop;
   char keys[DIGEST_LEN+CPATH_KEY_MATERIAL_LEN];
-  char buf[DIGEST_LEN+9];
-  char expected_digest[DIGEST_LEN];
 
   if(circ->purpose != CIRCUIT_PURPOSE_C_REND_READY ||
      !circ->build_state->pending_final_cpath) {
@@ -203,6 +201,8 @@
   circ->build_state->pending_final_cpath = NULL; /* prevent double-free */
 
   for(apconn = circ->p_streams; apconn; apconn = apconn->next_stream) {
+    apconn->cpath_layer = circ->cpath->prev;
+    /* now the last hop is different. be sure to send all the way. */
     if(connection_ap_handshake_send_begin(apconn, circ) < 0)
       return -1;
   }



More information about the tor-commits mailing list