mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
fix a pair of duplicate mark-for-closes
svn:r1643
This commit is contained in:
parent
f84fa39d87
commit
ed24a4f807
@ -1177,6 +1177,7 @@ static int connection_exit_begin_conn(cell_t *cell, circuit_t *circ) {
|
|||||||
if(rend_service_set_connection_addr_port(n_stream, circ) < 0) {
|
if(rend_service_set_connection_addr_port(n_stream, circ) < 0) {
|
||||||
log_fn(LOG_INFO,"Didn't find rendezvous service (port %d)",n_stream->port);
|
log_fn(LOG_INFO,"Didn't find rendezvous service (port %d)",n_stream->port);
|
||||||
connection_mark_for_close(n_stream, END_STREAM_REASON_EXITPOLICY);
|
connection_mark_for_close(n_stream, END_STREAM_REASON_EXITPOLICY);
|
||||||
|
circuit_mark_for_close(circ); /* knock the whole thing down, somebody screwed up */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
assert_circuit_ok(circ);
|
assert_circuit_ok(circ);
|
||||||
|
@ -892,14 +892,13 @@ rend_service_set_connection_addr_port(connection_t *conn, circuit_t *circ)
|
|||||||
log_fn(LOG_DEBUG,"beginning to hunt for addr/port");
|
log_fn(LOG_DEBUG,"beginning to hunt for addr/port");
|
||||||
if (base32_encode(serviceid, REND_SERVICE_ID_LEN+1,
|
if (base32_encode(serviceid, REND_SERVICE_ID_LEN+1,
|
||||||
circ->rend_pk_digest,10)) {
|
circ->rend_pk_digest,10)) {
|
||||||
|
log_fn(LOG_WARN,"bug: base32 failed");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
service = rend_service_get_by_pk_digest(circ->rend_pk_digest);
|
service = rend_service_get_by_pk_digest(circ->rend_pk_digest);
|
||||||
if (!service) {
|
if (!service) {
|
||||||
log_fn(LOG_WARN, "Couldn't find any service associated with pk %s on rendezvous circuit %d; closing",
|
log_fn(LOG_WARN, "Couldn't find any service associated with pk %s on rendezvous circuit %d; closing",
|
||||||
serviceid, circ->n_circ_id);
|
serviceid, circ->n_circ_id);
|
||||||
circuit_mark_for_close(circ);
|
|
||||||
connection_mark_for_close(conn, 0/*XXX*/);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
for (i = 0; i < smartlist_len(service->ports); ++i) {
|
for (i = 0; i < smartlist_len(service->ports); ++i) {
|
||||||
@ -910,9 +909,8 @@ rend_service_set_connection_addr_port(connection_t *conn, circuit_t *circ)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log_fn(LOG_WARN, "No virtual port mapping exists for port %d on service %s",
|
log_fn(LOG_INFO, "No virtual port mapping exists for port %d on service %s",
|
||||||
conn->port,serviceid);
|
conn->port,serviceid);
|
||||||
connection_mark_for_close(conn, 0/*XXX*/);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user