summaryrefslogtreecommitdiff
path: root/src/or/nodelist.c
diff options
context:
space:
mode:
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>2016-02-20 20:04:01 +1100
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>2016-02-20 23:40:37 +1100
commitc281c0365482891d6c3e71f85b2a6615faa5990b (patch)
treec18111633dc6aabfb73226fb3aeda858a32b0b15 /src/or/nodelist.c
parent4afb107278f528b9002415709d7a0003106ff70c (diff)
downloadtor-c281c0365482891d6c3e71f85b2a6615faa5990b.tar.gz
tor-c281c0365482891d6c3e71f85b2a6615faa5990b.zip
If both IPv4 and IPv6 addresses could be used, choose one correctly
If there is a node, use node_ipv6_or/dir_preferred(). If there is no node, use fascist_firewall_prefer_ipv6_or/dirport().
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r--src/or/nodelist.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 23e9b0e176..91353eea89 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -981,6 +981,9 @@ node_has_ipv6_dirport(const node_t *node)
* i) the node_t says that it prefers IPv6
* or
* ii) the router has no IPv4 OR address.
+ *
+ * If you don't have a node, consider looking it up.
+ * If there is no node, use fascist_firewall_prefer_ipv6_orport().
*/
int
node_ipv6_or_preferred(const node_t *node)
@@ -1078,6 +1081,8 @@ node_get_pref_ipv6_orport(const node_t *node, tor_addr_port_t *ap_out)
* i) the router has no IPv4 Dir address.
* or
* ii) our preference is for IPv6 Dir addresses.
+ *
+ * If there is no node, use fascist_firewall_prefer_ipv6_dirport().
*/
int
node_ipv6_dir_preferred(const node_t *node)