diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2018-04-23 20:06:34 +0000 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2018-05-09 21:23:06 +0000 |
commit | e07e95edd35f1608ecba94b281818d27f63812e3 (patch) | |
tree | 8e571ebd65e845771fcfe72c4a8176a80e78e863 /src/or/connection_edge.c | |
parent | 7b09282dc723381e68fef79c3474a56315a0edfa (diff) | |
download | tor-e07e95edd35f1608ecba94b281818d27f63812e3.tar.gz tor-e07e95edd35f1608ecba94b281818d27f63812e3.zip |
Bug 25903: Perform accounting for new CIRC_BW fields.
Two new values in each direction. DELIVERED counts valid end-to-end circuit
data that is accepted by our end and OVERHEAD counts the slack unused data in
each of the relay command cells for those accepted cells.
Control port changes are in the next commit.
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 955f942c50..02f1680ee3 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -3526,10 +3526,17 @@ connection_exit_begin_conn(cell_t *cell, circuit_t *circ) n_stream->deliver_window = STREAMWINDOW_START; if (circ->purpose == CIRCUIT_PURPOSE_S_REND_JOINED) { + int ret; tor_free(address); /* We handle this circuit and stream in this function for all supported * hidden service version. */ - return handle_hs_exit_conn(circ, n_stream); + ret = handle_hs_exit_conn(circ, n_stream); + + if (ret == 0) { + /* This was a valid cell. Count it as delivered + overhead. */ + circuit_read_valid_data(origin_circ, rh.length); + } + return ret; } tor_strlower(address); n_stream->base_.address = address; |