diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-01-15 11:26:14 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-01-16 16:41:53 -0500 |
commit | ceacda44f1064a5cc06a7eb29f31de19844ca6a7 (patch) | |
tree | 35dd3dead1380f446fb05adec9de9aa118f30ab7 /src/feature | |
parent | 8d94bcbf8c7c34a6e2d683982ef22ab6949c34ea (diff) | |
download | tor-ceacda44f1064a5cc06a7eb29f31de19844ca6a7.tar.gz tor-ceacda44f1064a5cc06a7eb29f31de19844ca6a7.zip |
Remove functions that checked for pre-ipv6 consensus.
We no longer need or need to test:
* node_awaiting_ipv6()
* networkstatus_consensus_has_ipv6().
Diffstat (limited to 'src/feature')
-rw-r--r-- | src/feature/nodelist/networkstatus.c | 22 | ||||
-rw-r--r-- | src/feature/nodelist/networkstatus.h | 1 |
2 files changed, 0 insertions, 23 deletions
diff --git a/src/feature/nodelist/networkstatus.c b/src/feature/nodelist/networkstatus.c index d0fada44d7..868812aaa8 100644 --- a/src/feature/nodelist/networkstatus.c +++ b/src/feature/nodelist/networkstatus.c @@ -1577,28 +1577,6 @@ networkstatus_consensus_is_already_downloading(const char *resource) return answer; } -/* Does the current, reasonably live consensus have IPv6 addresses? - * Returns 1 if there is a reasonably live consensus and its consensus method - * includes IPv6 addresses in the consensus. - * Otherwise, if there is no consensus, or the method does not include IPv6 - * addresses, returns 0. */ -int -networkstatus_consensus_has_ipv6(const or_options_t* options) -{ - (void) options; - const networkstatus_t *cons = networkstatus_get_reasonably_live_consensus( - approx_time(), - usable_consensus_flavor()); - - /* If we have no consensus, we have no IPv6 in it */ - if (!cons) { - return 0; - } - - /* All supported consensus methods have IPv6 addresses. */ - return 1; -} - /** Given two router status entries for the same router identity, return 1 if * if the contents have changed between them. Otherwise, return 0. */ static int diff --git a/src/feature/nodelist/networkstatus.h b/src/feature/nodelist/networkstatus.h index b8430088c9..38929fa6b6 100644 --- a/src/feature/nodelist/networkstatus.h +++ b/src/feature/nodelist/networkstatus.h @@ -104,7 +104,6 @@ int networkstatus_consensus_can_use_multiple_directories( MOCK_DECL(int, networkstatus_consensus_can_use_extra_fallbacks,( const or_options_t *options)); int networkstatus_consensus_is_already_downloading(const char *resource); -int networkstatus_consensus_has_ipv6(const or_options_t* options); #define NSSET_FROM_CACHE 1 #define NSSET_WAS_WAITING_FOR_CERTS 2 |