aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendcommon.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-05-14 14:25:07 -0400
committerNick Mathewson <nickm@torproject.org>2018-05-14 14:25:07 -0400
commita394a2dd86579495797432114f62ea3265ed5ed0 (patch)
tree90da2ee5c31e850fb59ba978dcfaab1865f1945d /src/or/rendcommon.c
parenta9ef335c1b220ad632aad1d75f671a2fcd2b0863 (diff)
parentfd504587d56d4062bccb0d815f4fd925fb8eb33c (diff)
downloadtor-a394a2dd86579495797432114f62ea3265ed5ed0.tar.gz
tor-a394a2dd86579495797432114f62ea3265ed5ed0.zip
Merge branch 'bug25903_v5_squashed'
Diffstat (limited to 'src/or/rendcommon.c')
-rw-r--r--src/or/rendcommon.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c
index 3a7dfe28f8..f3fa2f64d1 100644
--- a/src/or/rendcommon.c
+++ b/src/or/rendcommon.c
@@ -12,6 +12,7 @@
#include "or.h"
#include "circuitbuild.h"
+#include "circuituse.h"
#include "config.h"
#include "control.h"
#include "crypto_rand.h"
@@ -809,6 +810,11 @@ rend_process_relay_cell(circuit_t *circ, const crypt_path_t *layer_hint,
tor_fragile_assert();
}
+ if (r == 0 && origin_circ) {
+ /* This was a valid cell. Count it as delivered + overhead. */
+ circuit_read_valid_data(origin_circ, length);
+ }
+
if (r == -2)
log_info(LD_PROTOCOL, "Dropping cell (type %d) for wrong circuit type.",
command);