diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-05-21 14:00:30 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-05-21 14:00:30 -0400 |
commit | f5820a1bf1447299d4dc0c0f1d7daf4b29863b8b (patch) | |
tree | e1e4687d8252afcd0197bebd6c89cdbae79b75b8 /src/or/relay.c | |
parent | feeef00a6ad4629ab0d73b85195c0c9c8e9d57f0 (diff) | |
download | tor-f5820a1bf1447299d4dc0c0f1d7daf4b29863b8b.tar.gz tor-f5820a1bf1447299d4dc0c0f1d7daf4b29863b8b.zip |
Restore 8093 log messages to WARN severity, but rate limit
See #8093 for discussion
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index d57ceaacf8..cef138e721 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -1494,7 +1494,8 @@ connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ, if (layer_hint) { if (layer_hint->package_window + CIRCWINDOW_INCREMENT > 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. " "Closing circ."); return -END_CIRC_REASON_TORPROTOCOL; @@ -1506,7 +1507,8 @@ connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ, } else { if (circ->package_window + CIRCWINDOW_INCREMENT > 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. " "Closing circ (window %d).", circ->package_window); |