[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/maint-0.3.4] relays shouldn't close idle rend circuits



commit add0f89c14b4aab6726e11acdcd864ee0c91543b
Author: Roger Dingledine <arma@xxxxxxxxxxxxxx>
Date:   Sat Mar 9 02:55:28 2019 -0500

    relays shouldn't close idle rend circuits
    
    Allow connections to single onion services to remain idle without being
    disconnected.
    
    Relays acting as rendezvous points for single onion services were
    mistakenly closing idle established rendezvous circuits after 60 seconds,
    thinking that they are unused directory-fetching circuits that had served
    their purpose.
    
    Fixes bug 29665; bugfix on 0.2.1.26.
---
 changes/bug29665    | 7 +++++++
 src/or/circuituse.c | 5 ++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/changes/bug29665 b/changes/bug29665
new file mode 100644
index 000000000..d89046faf
--- /dev/null
+++ b/changes/bug29665
@@ -0,0 +1,7 @@
+  o Minor bugfixes (single onion services):
+    - Allow connections to single onion services to remain idle without
+      being disconnected. Relays acting as rendezvous points for
+      single onion services were mistakenly closing idle established
+      rendezvous circuits after 60 seconds, thinking that they are unused
+      directory-fetching circuits that had served their purpose. Fixes
+      bug 29665; bugfix on 0.2.1.26.
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 96cd3cd7e..7c0b60293 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -1381,10 +1381,13 @@ circuit_expire_old_circuits_serverside(time_t now)
     or_circ = TO_OR_CIRCUIT(circ);
     /* If the circuit has been idle for too long, and there are no streams
      * on it, and it ends here, and it used a create_fast, mark it for close.
+     *
+     * Also if there is a rend_splice on it, it's a single onion service
+     * circuit and we should not close it.
      */
     if (or_circ->is_first_hop && !circ->n_chan &&
         !or_circ->n_streams && !or_circ->resolving_streams &&
-        or_circ->p_chan &&
+        or_circ->p_chan && !or_circ->rend_splice &&
         channel_when_last_xmit(or_circ->p_chan) <= cutoff) {
       log_info(LD_CIRC, "Closing circ_id %u (empty %d secs ago)",
                (unsigned)or_circ->p_circ_id,



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits