diff options
author | teor <teor@torproject.org> | 2020-04-29 20:29:15 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2020-04-29 22:43:09 +1000 |
commit | 9a6186c267c613ab1cbcb7544e988fe62aab8548 (patch) | |
tree | 0281360e01234cf14d6221c4f9317fd8b424fa27 /src/feature/relay/circuitbuild_relay.h | |
parent | cab05a84cd1504bc4929207a1f33b266744e5dca (diff) | |
download | tor-9a6186c267c613ab1cbcb7544e988fe62aab8548.tar.gz tor-9a6186c267c613ab1cbcb7544e988fe62aab8548.zip |
relay: Refactor circuit_open_connection_for_extend()
Refactor circuit_open_connection_for_extend(), splitting out the IP
address choice code into a new function.
Adds unit tests. No behaviour changes in tor.
Part of 33817.
Diffstat (limited to 'src/feature/relay/circuitbuild_relay.h')
-rw-r--r-- | src/feature/relay/circuitbuild_relay.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/feature/relay/circuitbuild_relay.h b/src/feature/relay/circuitbuild_relay.h index d14f304f1c..0783161538 100644 --- a/src/feature/relay/circuitbuild_relay.h +++ b/src/feature/relay/circuitbuild_relay.h @@ -75,6 +75,9 @@ STATIC int circuit_extend_state_valid_helper(const struct circuit_t *circ); STATIC int circuit_extend_add_ed25519_helper(struct extend_cell_t *ec); STATIC int circuit_extend_lspec_valid_helper(const struct extend_cell_t *ec, const struct circuit_t *circ); +STATIC const tor_addr_port_t * circuit_choose_ip_ap_for_extend( + const tor_addr_port_t *ipv4_ap, + const tor_addr_port_t *ipv6_ap); STATIC void circuit_open_connection_for_extend(const struct extend_cell_t *ec, struct circuit_t *circ, int should_launch); |