summaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-04-05 17:51:00 +0000
committerRoger Dingledine <arma@torproject.org>2004-04-05 17:51:00 +0000
commitac84512489404f4d0cecec7353b1cc1dae1d2c69 (patch)
treed21c60190a6c77dd7ef879bc03ab1ef00f5ce5c8 /src/or/connection_edge.c
parent12ede0a2c4aa45fb32ab96cb7bb02496179ae1d5 (diff)
downloadtor-ac84512489404f4d0cecec7353b1cc1dae1d2c69.tar.gz
tor-ac84512489404f4d0cecec7353b1cc1dae1d2c69.zip
complain early if we get an unrecognized nickname from
bob's rend service descriptor svn:r1482
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 8c33b6cef5..cf61be1e9b 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -777,12 +777,16 @@ circuit_get_open_circ_or_launch(connection_t *conn,
if(desired_circuit_purpose == CIRCUIT_PURPOSE_C_INTRODUCING) {
/* need to pick an intro point */
- exitname = rend_get_random_intro(conn->rend_query);
+ exitname = rend_client_get_random_intro(conn->rend_query);
if(!exitname) {
log_fn(LOG_WARN,"Couldn't get an intro point for '%s'. Closing conn.",
conn->rend_query);
return -1;
}
+ if(!router_get_by_nickname(exitname)) {
+ log_fn(LOG_WARN,"Advertised intro point '%s' is not known. Closing.", exitname);
+ return -1;
+ }
log_fn(LOG_INFO,"Chose %s as intro point for %s.", exitname, conn->rend_query);
}