[or-cvs] r13584: backport r13583 (in tor/branches/tor-0_1_2-patches: . src/or)

arma at seul.org arma at seul.org
Tue Feb 19 21:38:28 UTC 2008


Author: arma
Date: 2008-02-19 16:38:27 -0500 (Tue, 19 Feb 2008)
New Revision: 13584

Modified:
   tor/branches/tor-0_1_2-patches/ChangeLog
   tor/branches/tor-0_1_2-patches/src/or/connection_edge.c
   tor/branches/tor-0_1_2-patches/src/or/directory.c
Log:
backport r13583


Modified: tor/branches/tor-0_1_2-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_1_2-patches/ChangeLog	2008-02-19 21:30:24 UTC (rev 13583)
+++ tor/branches/tor-0_1_2-patches/ChangeLog	2008-02-19 21:38:27 UTC (rev 13584)
@@ -7,6 +7,10 @@
       blocked_on_or_conn field set.  This prevents a rare assertion error
       that could occur when an OR connection carrying tunneled directory
       requests closed before the requests were complete.  Fixes bug 406.
+    - If we only ever used Tor for hidden service lookups or posts, we
+      would stop building circuits and start refusing connections after
+      24 hours, since we falsely believed that Tor was dormant. Reported
+      by nwf.
 
   o Minor bugfixes:
     - Stop recommending that every server operator send mail to tor-ops.

Modified: tor/branches/tor-0_1_2-patches/src/or/connection_edge.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/connection_edge.c	2008-02-19 21:30:24 UTC (rev 13583)
+++ tor/branches/tor-0_1_2-patches/src/or/connection_edge.c	2008-02-19 21:38:27 UTC (rev 13584)
@@ -1390,6 +1390,11 @@
       connection_mark_unattached_ap(conn, END_STREAM_REASON_TORPROTOCOL);
       return -1;
     }
+
+    /* Help predict this next time. We're not sure if it will need
+     * a stable circuit yet, but we know we'll need *something*. */
+    rep_hist_note_used_internal(now, 0, 1);
+
     if (r==0) {
       conn->_base.state = AP_CONN_STATE_RENDDESC_WAIT;
       log_info(LD_REND, "Unknown descriptor %s. Fetching.",

Modified: tor/branches/tor-0_1_2-patches/src/or/directory.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/directory.c	2008-02-19 21:30:24 UTC (rev 13583)
+++ tor/branches/tor-0_1_2-patches/src/or/directory.c	2008-02-19 21:38:27 UTC (rev 13584)
@@ -455,6 +455,10 @@
      * populate it and add it at the right state
      * socketpair and hook up both sides
      */
+
+    if (private_connection)
+      rep_hist_note_used_port(time(NULL), conn->_base.port);
+
     conn->dirconn_direct = 0;
     conn->_base.s =
       connection_ap_make_bridge(conn->_base.address, conn->_base.port,



More information about the tor-commits mailing list