mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +01:00
point out bug
svn:r791
This commit is contained in:
parent
9c8a54a39f
commit
9a0a638c02
@ -483,6 +483,8 @@ void connection_ap_attach_pending(void)
|
|||||||
/* r<0: There was an error sending the begin cell; other pending
|
/* r<0: There was an error sending the begin cell; other pending
|
||||||
* AP connections may succeed.
|
* AP connections may succeed.
|
||||||
*/
|
*/
|
||||||
|
/* XXX r is only <0 if openssl can't generate random bytes. if
|
||||||
|
* the begin failed, r==0 and the circ is closed. */
|
||||||
connection_ap_handshake_socks_reply(conn, NULL, 0, 0);
|
connection_ap_handshake_socks_reply(conn, NULL, 0, 0);
|
||||||
conn->marked_for_close = 1;
|
conn->marked_for_close = 1;
|
||||||
conn->has_sent_end = 1; /* if the begin failed, don't try an end */
|
conn->has_sent_end = 1; /* if the begin failed, don't try an end */
|
||||||
@ -606,9 +608,11 @@ static int connection_ap_handshake_send_begin(connection_t *ap_conn, circuit_t *
|
|||||||
assert(ap_conn->socks_request);
|
assert(ap_conn->socks_request);
|
||||||
assert(ap_conn->socks_request->addr);
|
assert(ap_conn->socks_request->addr);
|
||||||
|
|
||||||
if(crypto_pseudo_rand(STREAM_ID_SIZE, ap_conn->stream_id) < 0)
|
if(crypto_pseudo_rand(STREAM_ID_SIZE, ap_conn->stream_id) < 0) {
|
||||||
|
/* XXX can we just make this call abort if it fails? then this func could be a void. */
|
||||||
|
/* FIXME check for collisions */
|
||||||
return -1;
|
return -1;
|
||||||
/* FIXME check for collisions */
|
}
|
||||||
|
|
||||||
memcpy(payload, ap_conn->stream_id, STREAM_ID_SIZE);
|
memcpy(payload, ap_conn->stream_id, STREAM_ID_SIZE);
|
||||||
payload_len = STREAM_ID_SIZE + 1 +
|
payload_len = STREAM_ID_SIZE + 1 +
|
||||||
|
Loading…
Reference in New Issue
Block a user