[or-cvs] Fix possible bug in circID selection when building circuits...

Nick Mathewson nickm at seul.org
Mon Nov 17 18:40:59 UTC 2003


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv6019

Modified Files:
	circuit.c 
Log Message:
Fix possible bug in circID selection when building circuits on combination OP/OR servers

Index: circuit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuit.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- circuit.c	17 Nov 2003 09:30:29 -0000	1.102
+++ circuit.c	17 Nov 2003 18:40:56 -0000	1.103
@@ -777,6 +777,7 @@
   crypt_path_t *hop;
   routerinfo_t *router;
   int r;
+  int circ_id_type;
 
   assert(circ && circ->cpath);
 
@@ -784,7 +785,9 @@
     assert(circ->n_conn && circ->n_conn->type == CONN_TYPE_OR);
     
     log_fn(LOG_DEBUG,"First skin; sending create cell.");
-    circ->n_circ_id = get_unique_circ_id_by_conn(circ->n_conn, CIRC_ID_TYPE_BOTH);
+    circ_id_type = decide_circ_id_type(options.Nickname,
+                                       circ->n_conn->nickname);
+    circ->n_circ_id = get_unique_circ_id_by_conn(circ->n_conn, circ_id_type);
 
     memset(&cell, 0, sizeof(cell_t));
     cell.command = CELL_CREATE;



More information about the tor-commits mailing list