aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuit.c
diff options
context:
space:
mode:
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.");