[tor-commits] [tor/master] relay: Change LD_BUG log to LD_PROTOCOL_WARN

nickm at torproject.org nickm at torproject.org
Tue Apr 25 14:44:08 UTC 2017


commit 368b0913293dec9b392bce288753f5d90c130431
Author: David Goulet <dgoulet at torproject.org>
Date:   Tue Apr 25 09:24:56 2017 -0400

    relay: Change LD_BUG log to LD_PROTOCOL_WARN
    
    That log statement can be triggered if somebody on the Internet behaves badly
    which is possible with buggy implementation for instance.
    
    Fixes #21293
    
    Signed-off-by: David Goulet <dgoulet at torproject.org>
---
 changes/bug21293 | 5 +++++
 src/or/relay.c   | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/changes/bug21293 b/changes/bug21293
new file mode 100644
index 0000000..23a7547
--- /dev/null
+++ b/changes/bug21293
@@ -0,0 +1,5 @@
+  o Minor bugfixes (cell, logging):
+    - Downgrade a log statement from bug to protocol warning because there is
+      at least one use case where it can be triggered by a buggy tor
+      implementation on the Internet for instance. Fixes bug 21293; bugfix on
+      tor-0.1.1.14-alpha.
diff --git a/src/or/relay.c b/src/or/relay.c
index 8524080..1842012 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -226,7 +226,8 @@ circuit_receive_relay_cell(cell_t *cell, circuit_t *circ,
     return 0;
 
   if (relay_crypt(circ, cell, cell_direction, &layer_hint, &recognized) < 0) {
-    log_warn(LD_BUG,"relay crypt failed. Dropping connection.");
+    log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
+           "relay crypt failed. Dropping connection.");
     return -END_CIRC_REASON_INTERNAL;
   }
 





More information about the tor-commits mailing list