summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-08-29 16:05:58 -0400
committerNick Mathewson <nickm@torproject.org>2014-08-29 16:05:58 -0400
commit4a6f5bb2dda188ed1d1a80455bf9c9b0b3f00066 (patch)
tree5a99091f470828803ac7bbe41c13b8102276db00
parent37a76d75dd38a1ebd45627bb6e29e40f60917188 (diff)
downloadtor-4a6f5bb2dda188ed1d1a80455bf9c9b0b3f00066.tar.gz
tor-4a6f5bb2dda188ed1d1a80455bf9c9b0b3f00066.zip
Improve "Tried to establish rendezvous on non-OR or non-edge circuit"
Instead of putting it all in one warning message, log what exactly was wrong with the circuit. Resolves ticket 12997.
-rw-r--r--changes/bug129973
-rw-r--r--src/or/rendmid.c11
2 files changed, 12 insertions, 2 deletions
diff --git a/changes/bug12997 b/changes/bug12997
new file mode 100644
index 0000000000..fb6e7a8459
--- /dev/null
+++ b/changes/bug12997
@@ -0,0 +1,3 @@
+ o Minor features:
+ - Log more specific warnings when we get an ESTABLISH_RENDEZVOUS cell
+ on a cannibalized or non-OR circuit. Resolves ticket 12997.
diff --git a/src/or/rendmid.c b/src/or/rendmid.c
index 1103816806..d89cdf6bed 100644
--- a/src/or/rendmid.c
+++ b/src/or/rendmid.c
@@ -224,9 +224,16 @@ rend_mid_establish_rendezvous(or_circuit_t *circ, const uint8_t *request,
log_info(LD_REND, "Received an ESTABLISH_RENDEZVOUS request on circuit %u",
(unsigned)circ->p_circ_id);
- if (circ->base_.purpose != CIRCUIT_PURPOSE_OR || circ->base_.n_chan) {
+ if (circ->base_.purpose != CIRCUIT_PURPOSE_OR) {
+ log_warn(LD_PROTOCOL,
+ "Tried to establish rendezvous on non-OR circuit with purpose %s",
+ circuit_purpose_to_string(circ->base_.purpose));
+ goto err;
+ }
+
+ if (circ->base_.n_chan) {
log_warn(LD_PROTOCOL,
- "Tried to establish rendezvous on non-OR or non-edge circuit.");
+ "Tried to establish rendezvous on non-edge circuit");
goto err;
}