Files
tor/changes
George Kadianakis 248cbc2d22 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:29:44 +03:00
..
2018-09-15 23:19:31 +00:00
2018-08-18 19:23:28 +00:00
2018-10-30 10:49:03 -04:00
2018-11-06 15:17:19 -05:00
2018-11-12 15:39:28 -05:00
2018-11-14 07:51:36 -05:00
2018-11-19 15:48:08 -06:00
2018-12-17 10:57:47 -05:00
2019-01-09 08:52:05 -05:00
2019-01-16 14:40:31 -05:00
2019-02-08 08:37:23 -05:00
2019-01-22 12:27:46 -05:00
2019-02-19 11:38:32 -05:00
2019-12-17 09:47:28 -05:00
2019-05-31 12:39:52 -04:00
2019-04-10 12:46:27 +03:00
2019-04-09 12:05:33 -04:00
2019-05-14 19:19:53 -04:00
2020-07-28 11:30:47 -04:00
2019-08-22 22:09:32 +10:00
2020-05-06 16:58:06 -04:00
2019-06-12 08:55:38 -04:00
2019-03-26 12:24:45 +10:00
2018-10-29 15:18:07 -04:00
2018-10-30 11:28:53 -04:00
2018-12-01 11:18:03 -05:00
2019-06-28 21:38:33 +10:00
2019-02-08 08:52:46 -05:00
2019-02-08 10:43:38 -05:00
2019-04-01 14:08:24 +10:00
2019-04-12 08:38:30 -04:00
2019-04-30 09:15:35 +03:00
2019-05-20 08:56:34 -04:00
2019-08-15 08:20:47 -04:00
2019-10-20 22:04:08 +10:00
2019-12-16 09:06:25 +10:00
2019-12-06 10:51:43 +10:00
2020-03-17 11:44:45 -04:00