summaryrefslogtreecommitdiff
path: root/src/or/relay.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-04-22 20:39:35 -0400
committerNick Mathewson <nickm@torproject.org>2018-04-22 20:39:35 -0400
commit1ba9b7e0137afc1a4bd6da7dd986ed98999cfbe5 (patch)
tree0492733cf6f4af851652059104959c6aa597cc01 /src/or/relay.c
parent0e8ae82a8757fb8bb2850f1a3d59ad1dfb468556 (diff)
parentf921fd771ae51a82d971be064edca86b11f6004b (diff)
downloadtor-1ba9b7e0137afc1a4bd6da7dd986ed98999cfbe5.tar.gz
tor-1ba9b7e0137afc1a4bd6da7dd986ed98999cfbe5.zip
Merge remote-tracking branch 'mikeperry/bug25400_squashed'
Diffstat (limited to 'src/or/relay.c')
-rw-r--r--src/or/relay.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index a33e0d1f36..8c248e6d98 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -374,6 +374,12 @@ circuit_package_relay_cell(cell_t *cell, circuit_t *circ,
}
relay_encrypt_cell_outbound(cell, TO_ORIGIN_CIRCUIT(circ), layer_hint);
+
+ /* Update circ written totals for control port */
+ origin_circuit_t *ocirc = TO_ORIGIN_CIRCUIT(circ);
+ ocirc->n_written_circ_bw = tor_add_u32_nowrap(ocirc->n_written_circ_bw,
+ CELL_PAYLOAD_SIZE);
+
} else { /* incoming cell */
if (CIRCUIT_IS_ORIGIN(circ)) {
/* We should never package an _incoming_ cell from the circuit