summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-07 08:51:16 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-07 08:51:16 -0400
commit1e079ec30db716f92bf944489ec0408daef18d0f (patch)
tree7b1c69bc3e5a618fe508893cb7d8e188fe92a2f5
parentae7cb3349e8a159c3144e7d3ea66b9a439d7028e (diff)
parent9c404602a0a5dd0b916957f4c456c59defecea13 (diff)
downloadtor-1e079ec30db716f92bf944489ec0408daef18d0f.tar.gz
tor-1e079ec30db716f92bf944489ec0408daef18d0f.zip
Merge branch 'maint-0.3.1'
-rw-r--r--changes/bug23105-diagnostic4
-rw-r--r--src/or/relay.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/changes/bug23105-diagnostic b/changes/bug23105-diagnostic
new file mode 100644
index 0000000000..8ba4931e36
--- /dev/null
+++ b/changes/bug23105-diagnostic
@@ -0,0 +1,4 @@
+ o Minor features (diagnostic):
+ - Add a stack trace to the bug warnings that can be logged when
+ trying to send an outgoing relay cell with n_chan == 0.
+ Diagnostic attempt for bug 23105.
diff --git a/src/or/relay.c b/src/or/relay.c
index d8f09d320d..ba9c09b843 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -48,6 +48,7 @@
#define RELAY_PRIVATE
#include "or.h"
#include "addressmap.h"
+#include "backtrace.h"
#include "buffers.h"
#include "channel.h"
#include "circpathbias.h"
@@ -500,11 +501,13 @@ circuit_package_relay_cell(cell_t *cell, circuit_t *circ,
if (!chan) {
log_warn(LD_BUG,"outgoing relay cell sent from %s:%d has n_chan==NULL."
" Dropping.", filename, lineno);
+ log_backtrace(LOG_WARN,LD_BUG,"");
return 0; /* just drop it */
}
if (!CIRCUIT_IS_ORIGIN(circ)) {
log_warn(LD_BUG,"outgoing relay cell sent from %s:%d on non-origin "
"circ. Dropping.", filename, lineno);
+ log_backtrace(LOG_WARN,LD_BUG,"");
return 0; /* just drop it */
}