mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Prop 209: Add in hidserv path bias counts for usage.
This commit is contained in:
parent
412ae099cb
commit
aa0e6e2c03
@ -2454,6 +2454,10 @@ connection_exit_begin_conn(cell_t *cell, circuit_t *circ)
|
||||
assert_circuit_ok(circ);
|
||||
|
||||
connection_exit_connect(n_stream);
|
||||
|
||||
/* For path bias: This circuit was used successfully */
|
||||
origin_circ->any_streams_succeeded = 1;
|
||||
|
||||
tor_free(address);
|
||||
return 0;
|
||||
}
|
||||
|
@ -2873,9 +2873,8 @@ typedef struct origin_circuit_t {
|
||||
unsigned int isolation_any_streams_attached : 1;
|
||||
|
||||
/**
|
||||
* Did any SOCKS streams actually succeed on this circuit?
|
||||
*
|
||||
* XXX: We probably also need to set this for intro other hidserv circs..
|
||||
* Did any SOCKS streams or hidserv introductions actually succeed on
|
||||
* this circuit?
|
||||
*/
|
||||
unsigned int any_streams_succeeded : 1;
|
||||
|
||||
|
@ -378,6 +378,9 @@ rend_client_introduction_acked(origin_circuit_t *circ,
|
||||
* it to specify when a circuit entered the
|
||||
* _C_REND_READY_INTRO_ACKED state. */
|
||||
rendcirc->base_.timestamp_dirty = time(NULL);
|
||||
|
||||
/* For path bias: This circuit was used successfully */
|
||||
circ->any_streams_succeeded = 1;
|
||||
} else {
|
||||
log_info(LD_REND,"...Found no rend circ. Dropping on the floor.");
|
||||
}
|
||||
|
@ -1383,6 +1383,9 @@ rend_service_introduce(origin_circuit_t *circuit, const uint8_t *request,
|
||||
if (circuit_init_cpath_crypto(cpath,keys+DIGEST_LEN,1)<0)
|
||||
goto err;
|
||||
memcpy(cpath->handshake_digest, keys, DIGEST_LEN);
|
||||
|
||||
/* For path bias: This circuit was used successfully */
|
||||
circuit->any_streams_succeeded = 1;
|
||||
|
||||
goto done;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user