aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuit.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-04-25 19:04:11 +0000
committerNick Mathewson <nickm@torproject.org>2004-04-25 19:04:11 +0000
commit0fca143ea1699ffa68fab34ba329c7b2db2c7bca (patch)
treeaedce9da44314415baf347313cb8026625285b68 /src/or/circuit.c
parentcb3897e5abf2e93b240f5bee2baf32ada9eaa652 (diff)
downloadtor-0fca143ea1699ffa68fab34ba329c7b2db2c7bca.tar.gz
tor-0fca143ea1699ffa68fab34ba329c7b2db2c7bca.zip
Remove onion_pkey from connection, since onion keys can change more often than connections. Also add more log messages
svn:r1693
Diffstat (limited to 'src/or/circuit.c')
-rw-r--r--src/or/circuit.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/circuit.c b/src/or/circuit.c
index bf410c8a1b..5a5aa1efe1 100644
--- a/src/or/circuit.c
+++ b/src/or/circuit.c
@@ -1485,7 +1485,14 @@ int circuit_send_next_onion_skin(circuit_t *circ) {
cell.command = CELL_CREATE;
cell.circ_id = circ->n_circ_id;
- if(onion_skin_create(circ->n_conn->onion_pkey,
+ router = router_get_by_nickname(circ->n_conn->nickname);
+ if (!router) {
+ log_fn(LOG_WARN,"Couldn't find routerinfo for %s",
+ circ->n_conn->nickname);
+ return -1;
+ }
+
+ if(onion_skin_create(router->onion_pkey,
&(circ->cpath->handshake_state),
cell.payload) < 0) {
log_fn(LOG_WARN,"onion_skin_create (first hop) failed.");