mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 15:10:48 +01:00
circ: Remove useless param from cannibalization function
Because we just removed Tor2web support, the need_specific_rp is not needed anymore when cannibalizing a circuit. Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
parent
4976eca826
commit
67cd67611c
1 changed files with 3 additions and 6 deletions
|
@ -2001,12 +2001,11 @@ circuit_should_use_vanguards(uint8_t purpose)
|
||||||
static int
|
static int
|
||||||
circuit_should_cannibalize_to_build(uint8_t purpose_to_build,
|
circuit_should_cannibalize_to_build(uint8_t purpose_to_build,
|
||||||
int has_extend_info,
|
int has_extend_info,
|
||||||
int onehop_tunnel,
|
int onehop_tunnel)
|
||||||
int need_specific_rp)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Do not try to cannibalize if this is a one hop circuit. */
|
/* Do not try to cannibalize if this is a one hop circuit. */
|
||||||
if (onehop_tunnel || need_specific_rp) {
|
if (onehop_tunnel) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2055,7 +2054,6 @@ circuit_launch_by_extend_info(uint8_t purpose,
|
||||||
origin_circuit_t *circ;
|
origin_circuit_t *circ;
|
||||||
int onehop_tunnel = (flags & CIRCLAUNCH_ONEHOP_TUNNEL) != 0;
|
int onehop_tunnel = (flags & CIRCLAUNCH_ONEHOP_TUNNEL) != 0;
|
||||||
int have_path = have_enough_path_info(! (flags & CIRCLAUNCH_IS_INTERNAL) );
|
int have_path = have_enough_path_info(! (flags & CIRCLAUNCH_IS_INTERNAL) );
|
||||||
int need_specific_rp = 0;
|
|
||||||
|
|
||||||
/* Keep some stats about our attempts to launch HS rendezvous circuits */
|
/* Keep some stats about our attempts to launch HS rendezvous circuits */
|
||||||
if (purpose == CIRCUIT_PURPOSE_S_CONNECT_REND) {
|
if (purpose == CIRCUIT_PURPOSE_S_CONNECT_REND) {
|
||||||
|
@ -2075,8 +2073,7 @@ circuit_launch_by_extend_info(uint8_t purpose,
|
||||||
* then do so. */
|
* then do so. */
|
||||||
if (circuit_should_cannibalize_to_build(purpose,
|
if (circuit_should_cannibalize_to_build(purpose,
|
||||||
extend_info != NULL,
|
extend_info != NULL,
|
||||||
onehop_tunnel,
|
onehop_tunnel)) {
|
||||||
need_specific_rp)) {
|
|
||||||
/* see if there are appropriate circs available to cannibalize. */
|
/* see if there are appropriate circs available to cannibalize. */
|
||||||
/* XXX if we're planning to add a hop, perhaps we want to look for
|
/* XXX if we're planning to add a hop, perhaps we want to look for
|
||||||
* internal circs rather than exit circs? -RD */
|
* internal circs rather than exit circs? -RD */
|
||||||
|
|
Loading…
Add table
Reference in a new issue