* to back. Stop estimating RTT in this case. Note that we only
* stop RTT update if the circuit is opened, to allow for RTT estimates
* of var cells during circ setup. */
- mi->stop_rtt_update = 1;
-
- if (!mi->rtt_estimate_usec) {
+ if (!mi->rtt_estimate_usec && !mi->stop_rtt_update) {
static ratelim_t rtt_lim = RATELIM_INIT(600);
log_fn_ratelim(&rtt_lim,LOG_NOTICE,LD_BUG,
"Circuit sent two cells back to back before estimating RTT.");
}
+ mi->stop_rtt_update = 1;
}
}
uint8_t relay_command,
crypt_path_t *layer_hint)
{
- /* Padding negotiate cells are ignored by the state machines
- * for simplicity. */
- if (relay_command == RELAY_COMMAND_PADDING_NEGOTIATE ||
- relay_command == RELAY_COMMAND_PADDING_NEGOTIATED) {
- return;
- }
-
if (relay_command == RELAY_COMMAND_DROP) {
rep_hist_padding_count_read(PADDING_TYPE_DROP);
circpad_deliver_sent_relay_cell_events(circuit_t *circ,
uint8_t relay_command)
{
- /* Padding negotiate cells are ignored by the state machines
- * for simplicity. */
- if (relay_command == RELAY_COMMAND_PADDING_NEGOTIATE ||
- relay_command == RELAY_COMMAND_PADDING_NEGOTIATED) {
- return;
- }
-
/* RELAY_COMMAND_DROP is the multi-hop (aka circuit-level) padding cell in
* tor. (CELL_PADDING is a channel-level padding cell, which is not relayed
- * or processed here) */
+ * or processed here).
+ *
+ * We do generate events for PADDING_NEGOTIATE and PADDING_NEGOTIATED cells.
+ */
if (relay_command == RELAY_COMMAND_DROP) {
/* Optimization: The event for RELAY_COMMAND_DROP is sent directly
* from circpad_send_padding_cell_for_callback(). This is to avoid
const circpad_machine_spec_t *, m) {
if (m->machine_num == negotiate->machine_type) {
circpad_setup_machine_on_circ(circ, m);
+ circpad_cell_event_nonpadding_received(circ);
goto done;
}
} SMARTLIST_FOREACH_END(m);