mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
complain early if we get an unrecognized nickname from
bob's rend service descriptor svn:r1482
This commit is contained in:
parent
12ede0a2c4
commit
ac84512489
@ -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);
|
||||
}
|
||||
|
||||
|
@ -1046,7 +1046,7 @@ int rend_client_receive_rendezvous(circuit_t *circ, const char *request, int req
|
||||
void rend_client_desc_fetched(char *query, int success);
|
||||
|
||||
int rend_cmp_service_ids(char *one, char *two);
|
||||
char *rend_get_random_intro(char *query);
|
||||
char *rend_client_get_random_intro(char *query);
|
||||
int rend_parse_rendezvous_address(char *address);
|
||||
|
||||
int rend_client_send_establish_rendezvous(circuit_t *circ);
|
||||
|
@ -208,7 +208,7 @@ int rend_cmp_service_ids(char *one, char *two) {
|
||||
/* return a pointer to a nickname for a random introduction
|
||||
* point of query. return NULL if error.
|
||||
*/
|
||||
char *rend_get_random_intro(char *query) {
|
||||
char *rend_client_get_random_intro(char *query) {
|
||||
const char *descp;
|
||||
int desc_len;
|
||||
int i;
|
||||
|
Loading…
Reference in New Issue
Block a user