diff -Naur tor-0.2.2.22-alpha.old/src/or/circuitbuild.c tor-0.2.2.22-alpha.newnym/src/or/circuitbuild.c --- tor-0.2.2.22-alpha.old/src/or/circuitbuild.c 2011-01-25 22:33:39.000000000 +0100 +++ tor-0.2.2.22-alpha.newnym/src/or/circuitbuild.c 2011-03-04 11:44:01.212529978 +0100 @@ -2066,8 +2066,7 @@ can_complete_circuit=0; /* so it'll log when it works again */ control_event_client_status(severity, "CIRCUIT_NOT_ESTABLISHED REASON=%s", "CLOCK_JUMPED"); - circuit_mark_all_unused_circs(); - circuit_expire_all_dirty_circs(); + circuit_mark_all_circs(); } /** Take the 'extend' cell, pull out addr/port plus the onion diff -Naur tor-0.2.2.22-alpha.old/src/or/circuitlist.c tor-0.2.2.22-alpha.newnym/src/or/circuitlist.c --- tor-0.2.2.22-alpha.old/src/or/circuitlist.c 2011-01-25 22:33:39.000000000 +0100 +++ tor-0.2.2.22-alpha.newnym/src/or/circuitlist.c 2011-03-04 11:42:30.748529978 +0100 @@ -1002,16 +1002,18 @@ } /** Go through the circuitlist; mark-for-close each circuit that starts - * at us but has not yet been used. */ + * at us. + * + * This is useful for letting the user change pseudonyms, so new + * streams will not be linkable to old streams. */ void -circuit_mark_all_unused_circs(void) +circuit_mark_all_circs(void) { circuit_t *circ; for (circ=global_circuitlist; circ; circ = circ->next) { if (CIRCUIT_IS_ORIGIN(circ) && - !circ->marked_for_close && - !circ->timestamp_dirty) + !circ->marked_for_close) circuit_mark_for_close(circ, END_CIRC_REASON_FINISHED); } } @@ -1019,9 +1021,6 @@ /** Go through the circuitlist; for each circuit that starts at us * and is dirty, frob its timestamp_dirty so we won't use it for any * new streams. - * - * This is useful for letting the user change pseudonyms, so new - * streams will not be linkable to old streams. */ void circuit_expire_all_dirty_circs(void) diff -Naur tor-0.2.2.22-alpha.old/src/or/circuitlist.h tor-0.2.2.22-alpha.newnym/src/or/circuitlist.h --- tor-0.2.2.22-alpha.old/src/or/circuitlist.h 2011-01-16 04:44:28.000000000 +0100 +++ tor-0.2.2.22-alpha.newnym/src/or/circuitlist.h 2011-03-04 11:37:44.186529978 +0100 @@ -39,7 +39,7 @@ or_circuit_t *circuit_get_intro_point(const char *digest); origin_circuit_t *circuit_find_to_cannibalize(uint8_t purpose, extend_info_t *info, int flags); -void circuit_mark_all_unused_circs(void); +void circuit_mark_all_circs(void); void circuit_expire_all_dirty_circs(void); void _circuit_mark_for_close(circuit_t *circ, int reason, int line, const char *file); diff -Naur tor-0.2.2.22-alpha.old/src/or/config.c tor-0.2.2.22-alpha.newnym/src/or/config.c --- tor-0.2.2.22-alpha.old/src/or/config.c 2011-01-25 22:33:58.000000000 +0100 +++ tor-0.2.2.22-alpha.newnym/src/or/config.c 2011-03-04 11:42:47.604529977 +0100 @@ -1263,9 +1263,8 @@ options->StrictNodes != old_options->StrictNodes) { log_info(LD_CIRC, "Changed to using entry guards, or changed preferred or " - "excluded node lists. Abandoning previous circuits."); - circuit_mark_all_unused_circs(); - circuit_expire_all_dirty_circs(); + "excluded node lists. Abandoning all circuits."); + circuit_mark_all_circs(); } /* How long should we delay counting bridge stats after becoming a bridge? diff -Naur tor-0.2.2.22-alpha.old/src/or/main.c tor-0.2.2.22-alpha.newnym/src/or/main.c --- tor-0.2.2.22-alpha.old/src/or/main.c 2011-01-25 22:33:39.000000000 +0100 +++ tor-0.2.2.22-alpha.newnym/src/or/main.c 2011-03-04 11:43:13.514529979 +0100 @@ -843,7 +843,7 @@ static void signewnym_impl(time_t now) { - circuit_expire_all_dirty_circs(); + circuit_mark_all_circs(); addressmap_clear_transient(); time_of_last_signewnym = now; signewnym_is_pending = 0;