mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 13:43:47 +01:00
More LOG_PROTOCOL_WARN.
Make origin-side messages about padding negotiation failure into LOG_PROTOCOL_WARN. I'm not sure I like this either.. But the negotiation refusal case might happen naturally due to consensus drift, and is functionally no different than a corrupted cell.
This commit is contained in:
parent
6263755728
commit
e54ce03b4f
@ -2805,7 +2805,7 @@ circpad_handle_padding_negotiate(circuit_t *circ, cell_t *cell)
|
|||||||
circpad_negotiate_t *negotiate;
|
circpad_negotiate_t *negotiate;
|
||||||
|
|
||||||
if (CIRCUIT_IS_ORIGIN(circ)) {
|
if (CIRCUIT_IS_ORIGIN(circ)) {
|
||||||
log_fn(LOG_WARN, LD_CIRC,
|
log_fn(LOG_PROTOCOL_WARN, LD_CIRC,
|
||||||
"Padding negotiate cell unsupported at origin.");
|
"Padding negotiate cell unsupported at origin.");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -2871,7 +2871,7 @@ circpad_handle_padding_negotiated(circuit_t *circ, cell_t *cell,
|
|||||||
|
|
||||||
/* Verify this came from the expected hop */
|
/* Verify this came from the expected hop */
|
||||||
if (!circpad_padding_is_from_expected_hop(circ, layer_hint)) {
|
if (!circpad_padding_is_from_expected_hop(circ, layer_hint)) {
|
||||||
log_fn(LOG_WARN, LD_CIRC,
|
log_fn(LOG_PROTOCOL_WARN, LD_CIRC,
|
||||||
"Padding negotiated cell from wrong hop!");
|
"Padding negotiated cell from wrong hop!");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -2898,7 +2898,7 @@ circpad_handle_padding_negotiated(circuit_t *circ, cell_t *cell,
|
|||||||
// and be sad
|
// and be sad
|
||||||
free_circ_machineinfos_with_machine_num(circ, negotiated->machine_type);
|
free_circ_machineinfos_with_machine_num(circ, negotiated->machine_type);
|
||||||
TO_ORIGIN_CIRCUIT(circ)->padding_negotiation_failed = 1;
|
TO_ORIGIN_CIRCUIT(circ)->padding_negotiation_failed = 1;
|
||||||
log_fn(LOG_INFO, LD_CIRC,
|
log_fn(LOG_PROTOCOL_WARN, LD_CIRC,
|
||||||
"Middle node did not accept our padding request.");
|
"Middle node did not accept our padding request.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user