summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-04-19 12:00:41 +1000
committerteor <teor@torproject.org>2019-04-19 12:00:41 +1000
commit231036a110c1062e39b214b4b88fdc2a1eb46dc8 (patch)
tree9265e0873c59cb48d90d047b3a277bf81f4f3c00 /src
parent742b5b32d502712c7ad6d75adbf25fca6986c898 (diff)
parentcbce8dedd3703424111928d68dfe8920900ce054 (diff)
downloadtor-231036a110c1062e39b214b4b88fdc2a1eb46dc8.tar.gz
tor-231036a110c1062e39b214b4b88fdc2a1eb46dc8.zip
Merge branch 'maint-0.3.4' into maint-0.3.5
Diffstat (limited to 'src')
-rw-r--r--src/core/or/circuituse.c4
-rw-r--r--src/feature/relay/router.c11
2 files changed, 9 insertions, 6 deletions
diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c
index e306307c4c..02bfa15fb3 100644
--- a/src/core/or/circuituse.c
+++ b/src/core/or/circuituse.c
@@ -1570,10 +1570,14 @@ 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->p_chan && channel_is_client(or_circ->p_chan) &&
!circ->n_chan &&
!or_circ->n_streams && !or_circ->resolving_streams &&
+ !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,
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index b376046c8d..dad2c6a50f 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -2936,12 +2936,11 @@ extrainfo_dump_to_string(char **s_out, extrainfo_t *extrainfo,
"conn-bi-direct", now, &contents) > 0) {
smartlist_add(chunks, contents);
}
- }
-
- if (options->PaddingStatistics) {
- contents = rep_hist_get_padding_count_lines();
- if (contents)
- smartlist_add(chunks, contents);
+ if (options->PaddingStatistics) {
+ contents = rep_hist_get_padding_count_lines();
+ if (contents)
+ smartlist_add(chunks, contents);
+ }
}
/* Add information about the pluggable transports we support. */