]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Don't crash when HS circs which have not yet found an OR conn time out
authorRobert Ransom <rransom.8774@gmail.com>
Fri, 13 Jan 2012 03:20:52 +0000 (19:20 -0800)
committerRobert Ransom <rransom.8774@gmail.com>
Fri, 13 Jan 2012 03:21:39 +0000 (19:21 -0800)
Fixes bug #4897, not yet in any release.

Using n_circ_id alone here (and below, when n_conn is NULL) really sucks,
but that's a separate bug which will need a changes/ file.

src/or/circuituse.c

index 14f4f47a8f670d3aea2105d687b8af17b81e5cb6..de0aa7da20a48e2493977888e0a975448519ff80 100644 (file)
@@ -537,9 +537,8 @@ circuit_expire_building(void)
       case CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT:
       case CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED:
         /* If we have reached this line, we want to spare the circ for now. */
-        log_info(LD_CIRC,"Marking circ %s:%d:%d (state %d:%s, purpose %d) "
+        log_info(LD_CIRC,"Marking circ %d (state %d:%s, purpose %d) "
                  "as timed-out HS circ",
-                 victim->n_conn->_base.address, victim->n_conn->_base.port,
                  victim->n_circ_id,
                  victim->state, circuit_state_to_string(victim->state),
                  victim->purpose);
@@ -556,9 +555,8 @@ circuit_expire_building(void)
     if (!(options->CloseHSServiceRendCircuitsImmediatelyOnTimeout) &&
         !(TO_ORIGIN_CIRCUIT(victim)->hs_circ_has_timed_out) &&
         victim->purpose == CIRCUIT_PURPOSE_S_CONNECT_REND) {
-      log_info(LD_CIRC,"Marking circ %s:%d:%d (state %d:%s, purpose %d) "
+      log_info(LD_CIRC,"Marking circ %d (state %d:%s, purpose %d) "
                "as timed-out HS circ; relaunching rendezvous attempt.",
-               victim->n_conn->_base.address, victim->n_conn->_base.port,
                victim->n_circ_id,
                victim->state, circuit_state_to_string(victim->state),
                victim->purpose);