Index: /home/karsten/tor/tor-trunk-155-patch1/ChangeLog =================================================================== --- /home/karsten/tor/tor-trunk-155-patch1/ChangeLog (revision 17050) +++ /home/karsten/tor/tor-trunk-155-patch1/ChangeLog (working copy) @@ -3,6 +3,8 @@ - Now NodeFamily and MyFamily config options allow spaces in identity fingerprints, so it's easier to paste them in. Suggested by Lucky Green. + - Reduce extension timeout for introduction circuits from 60 to 30 + seconds. Changes in version 0.2.1.6-alpha - 2008-09-30 Index: /home/karsten/tor/tor-trunk-155-patch1/src/or/circuituse.c =================================================================== --- /home/karsten/tor/tor-trunk-155-patch1/src/or/circuituse.c (revision 17050) +++ /home/karsten/tor/tor-trunk-155-patch1/src/or/circuituse.c (working copy) @@ -251,8 +251,11 @@ circuit_expire_building(time_t now) { circuit_t *victim, *circ = global_circuitlist; - time_t cutoff = now - get_options()->CircuitBuildTimeout; + time_t cutoff; + time_t general_cutoff = now - get_options()->CircuitBuildTimeout; time_t begindir_cutoff = now - get_options()->CircuitBuildTimeout/2; +#define REND_INTRO_CIRC_TIMEOUT 30 + time_t introrend_cutoff = now - REND_INTRO_CIRC_TIMEOUT; cpath_build_state_t *build_state; while (circ) { @@ -263,11 +266,21 @@ continue; build_state = TO_ORIGIN_CIRCUIT(victim)->build_state; - if (victim->timestamp_created > - ((build_state && build_state->onehop_tunnel) ? - begindir_cutoff : cutoff)) + if (build_state && build_state->onehop_tunnel) + cutoff = begindir_cutoff; + else if (victim->purpose == CIRCUIT_PURPOSE_C_INTRODUCING) + cutoff = introrend_cutoff; + else + cutoff = general_cutoff; + if (victim->timestamp_created > cutoff) continue; /* it's still young, leave it alone */ + if (victim->purpose == CIRCUIT_PURPOSE_C_INTRODUCING && + victim->timestamp_created <= introrend_cutoff && + victim->timestamp_created > general_cutoff) + log_info(LD_REND|LD_CIRC, "Timing out introduction circuit which we " + "would not have done if it had been a general circuit."); + #if 0 /* some debug logs, to help track bugs */ if (victim->purpose >= CIRCUIT_PURPOSE_C_INTRODUCING &&