mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +01:00
Restore 8093 log messages to WARN severity, but rate limit
See #8093 for discussion
This commit is contained in:
parent
feeef00a6a
commit
f5820a1bf1
3
changes/bug8093.part2
Normal file
3
changes/bug8093.part2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
o Minor features:
|
||||||
|
- Return the "unexpected sendme" warnings to a warn severity, but make
|
||||||
|
them rate limited. Related to ticket #8093.
|
@ -1494,7 +1494,8 @@ connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ,
|
|||||||
if (layer_hint) {
|
if (layer_hint) {
|
||||||
if (layer_hint->package_window + CIRCWINDOW_INCREMENT >
|
if (layer_hint->package_window + CIRCWINDOW_INCREMENT >
|
||||||
CIRCWINDOW_START_MAX) {
|
CIRCWINDOW_START_MAX) {
|
||||||
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
|
static struct ratelim_t exit_warn_ratelim = RATELIM_INIT(600);
|
||||||
|
log_fn_ratelim(&exit_warn_ratelim, LOG_WARN, LD_PROTOCOL,
|
||||||
"Unexpected sendme cell from exit relay. "
|
"Unexpected sendme cell from exit relay. "
|
||||||
"Closing circ.");
|
"Closing circ.");
|
||||||
return -END_CIRC_REASON_TORPROTOCOL;
|
return -END_CIRC_REASON_TORPROTOCOL;
|
||||||
@ -1506,7 +1507,8 @@ connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ,
|
|||||||
} else {
|
} else {
|
||||||
if (circ->package_window + CIRCWINDOW_INCREMENT >
|
if (circ->package_window + CIRCWINDOW_INCREMENT >
|
||||||
CIRCWINDOW_START_MAX) {
|
CIRCWINDOW_START_MAX) {
|
||||||
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
|
static struct ratelim_t client_warn_ratelim = RATELIM_INIT(600);
|
||||||
|
log_fn_ratelim(&client_warn_ratelim, LOG_WARN, LD_PROTOCOL,
|
||||||
"Unexpected sendme cell from client. "
|
"Unexpected sendme cell from client. "
|
||||||
"Closing circ (window %d).",
|
"Closing circ (window %d).",
|
||||||
circ->package_window);
|
circ->package_window);
|
||||||
|
Loading…
Reference in New Issue
Block a user