Files
tor/changes
George Kadianakis 85a1e6c601 statistics: Properly count all rendezvous cells (avoid undercounting).
tl;dr We were not counting cells flying from the client to the service, but we
were counting cells flying from the service to the client.

When a rendezvous cell arrives from the client to the RP, the RP forwards it to
the service.

For this to happen, the cell first passes through command_process_relay_cell()
which normally does the statistics counting. However because the `rend_circ`
circuit was not flagged with `circuit_carries_hs_traffic_stats` in
rend_mid_rendezvous(), the cell is not counted there.

Then the cell goes to circuit_receive_relay_cell() which has a special code
block based on `rend_splice` specifically for rendezvous cells, and the cell
gets directly passed to `rend_circ` via a direct call to
circuit_receive_relay_cell(). The cell never passes through
command_process_relay_cell() ever again and hence is never counted by our
rephist module.

The fix here is to flag the `rend_circ` circuit with
`circuit_carries_hs_traffic_stats` so that the cell is counted as soon as it
hits command_process_relay_cell().

Furthermore we avoid double-counting cells since the special code block of
circuit_receive_relay_cell() makes us count rendezvous cells only as they enter
the RP and not as they exit it.

Fixes #40117.
2020-09-07 13:30:21 +03:00
..
2020-02-18 13:23:30 +10:00
2020-07-28 11:30:47 -04:00
2020-05-15 10:27:49 -04:00
2020-05-27 15:16:39 +03:00
2020-01-28 20:32:40 +08:00
2020-04-07 17:35:55 +10:00
2020-07-13 10:44:39 -04:00
2020-03-17 21:07:47 +10:00
2020-07-02 10:14:48 -04:00
2020-06-04 10:35:51 -04:00
2020-03-30 13:36:54 -04:00
2020-02-18 13:34:46 -06:00
2020-02-18 13:23:50 -05:00
2020-02-20 17:13:02 -06:00
2020-03-03 14:35:01 +02:00
2020-04-09 11:00:04 +10:00
2020-05-21 13:43:37 +03:00
2020-05-05 14:24:04 -04:00
2020-04-29 22:43:09 +10:00
2020-06-04 12:08:02 -04:00