]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add check for CIRCUIT_PURPOSE_S_REND_JOINED.
authorMike Perry <mikeperry-git@fscked.org>
Tue, 27 Jul 2010 15:45:23 +0000 (08:45 -0700)
committerRoger Dingledine <arma@torproject.org>
Sat, 14 Aug 2010 00:46:33 +0000 (20:46 -0400)
These circuits stick around much longer than others on the server side for
performance reasons. Their lifetime is controlled by the client.

src/or/circuituse.c

index 4503e1d81729a574e17d822aa31360c3214e75dc..65ecb5433cb6c2b99ebced32da98a5bba6e4c9a4 100644 (file)
@@ -746,13 +746,18 @@ circuit_expire_old_circuits_clientside(time_t now)
                     (long)(now - circ->timestamp_created));
           circuit_mark_for_close(circ, END_CIRC_REASON_FINISHED);
         } else if (!TO_ORIGIN_CIRCUIT(circ)->is_ancient) {
-          log_notice(LD_CIRC,
-                     "Ancient non-dirty circuit %d is still around after "
-                     "%ld seconds. Purpose: %d",
-                     TO_ORIGIN_CIRCUIT(circ)->global_identifier,
-                     (long)(now - circ->timestamp_created),
-                     circ->purpose);
-          TO_ORIGIN_CIRCUIT(circ)->is_ancient = 1;
+          /* Server side rend joined circuits can end up really old, because
+           * they are reused by clients for longer than normal. The client
+           * controls their lifespan. */
+          if (circ->purpose != CIRCUIT_PURPOSE_S_REND_JOINED) {
+            log_notice(LD_CIRC,
+                       "Ancient non-dirty circuit %d is still around after "
+                       "%ld seconds. Purpose: %d",
+                       TO_ORIGIN_CIRCUIT(circ)->global_identifier,
+                       (long)(now - circ->timestamp_created),
+                       circ->purpose);
+            TO_ORIGIN_CIRCUIT(circ)->is_ancient = 1;
+          }
         }
       }
     }