summaryrefslogtreecommitdiff
path: root/src/feature/relay/circuitbuild_relay.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-06-18 16:05:16 -0400
committerNick Mathewson <nickm@torproject.org>2020-06-18 16:05:16 -0400
commitbc9979a670026004bf0a516bd38a25251ca6d9bb (patch)
tree73fde4834208dbd9209bad0f589244b5be74f9a2 /src/feature/relay/circuitbuild_relay.c
parent6c3897826a21734d2ab4f621df62e337d8bb8391 (diff)
downloadtor-bc9979a670026004bf0a516bd38a25251ca6d9bb.tar.gz
tor-bc9979a670026004bf0a516bd38a25251ca6d9bb.zip
Split "can reach ipv4 orport" from "can reach ipv6 orport".
I've managed to keep this change mainly contained to our self-testing module. The changes here are: * There are two different variables for tracking "is our orport reachable". * We have a new function that says whether we can skip a single family's orport reachability test; the old function for this now tells whether we can skip _all_ orport reachability testing. (The name, router_should_skip_orport_reachability_test, is not so good. I will rename it later if I can think of a good replacement.) * The function that launches orport reachability tests now only launches the ones that haven't completed. * The function that notes that we're reachable on an ORPort now takes a family. * Various log messages are cleaned up.
Diffstat (limited to 'src/feature/relay/circuitbuild_relay.c')
-rw-r--r--src/feature/relay/circuitbuild_relay.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/feature/relay/circuitbuild_relay.c b/src/feature/relay/circuitbuild_relay.c
index b89866b477..4a7f639ca9 100644
--- a/src/feature/relay/circuitbuild_relay.c
+++ b/src/feature/relay/circuitbuild_relay.c
@@ -542,7 +542,11 @@ onionskin_answer(struct or_circuit_t *circ,
/* record that we could process create cells from a non-local conn
* that we didn't initiate; presumably this means that create cells
* can reach us too. */
- router_orport_found_reachable();
+ tor_addr_t remote_addr;
+ if (channel_get_addr_if_possible(circ->p_chan, &remote_addr)) {
+ int family = tor_addr_family(&remote_addr);
+ router_orport_found_reachable(family);
+ }
}
return 0;