diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-04-04 12:17:16 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-04-04 12:17:16 -0400 |
commit | 8f16a77d6ae6bfc8f7983decf8269ae70ca1cc5e (patch) | |
tree | 50e2b9fec96388e994f4514b05ee5961f8c1f1a3 /src/or/circuitlist.c | |
parent | d22ce149c82c257398555d35cf76cab4973a8cf9 (diff) | |
download | tor-8f16a77d6ae6bfc8f7983decf8269ae70ca1cc5e.tar.gz tor-8f16a77d6ae6bfc8f7983decf8269ae70ca1cc5e.zip |
Protocol_Warn when a rendezvous cookie is used twice.
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r-- | src/or/circuitlist.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index a5b43f7374..065f98034e 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -1343,8 +1343,14 @@ circuit_set_rend_token(or_circuit_t *circ, int is_rend_circ, if (found_circ) { tor_assert(found_circ != circ); circuit_clear_rend_token(found_circ); - if (! found_circ->base_.marked_for_close) + if (! found_circ->base_.marked_for_close) { circuit_mark_for_close(TO_CIRCUIT(found_circ), END_CIRC_REASON_FINISHED); + if (is_rend_circ) { + log_fn(LOG_PROTOCOL_WARN, LD_REND, + "Duplicate rendezvous cookie (%s...) used on two circuits", + hex_str((const char*)token, 4)); /* only log first 4 chars */ + } + } } /* Now set up the rendinfo */ |