diff options
author | teor <teor2345@gmail.com> | 2017-10-26 16:49:00 +1100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-11-02 10:19:05 -0400 |
commit | cc072b6fbfee7208f41309b76badec65adbca8ee (patch) | |
tree | ed19cbd95dc709e21608e45f6b20ef5815d40deb /src/or/hs_config.c | |
parent | a4f34c1106c5cd14ce3eda3877d41ff2f76ff0dd (diff) | |
download | tor-cc072b6fbfee7208f41309b76badec65adbca8ee.tar.gz tor-cc072b6fbfee7208f41309b76badec65adbca8ee.zip |
Stop users configuring IPv6-only v3 single onion services
They are not yet implemented: they will upload descriptors, but won't be
able to rendezvous, because IPv6 addresses in link specifiers are ignored.
Part of #23820.
Diffstat (limited to 'src/or/hs_config.c')
-rw-r--r-- | src/or/hs_config.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/or/hs_config.c b/src/or/hs_config.c index 5f9282ea79..fa5c1ab176 100644 --- a/src/or/hs_config.c +++ b/src/or/hs_config.c @@ -424,11 +424,19 @@ config_generic_service(const config_line_t *line_, } } - /* Check if we are configured in non anonymous mode and single hop mode - * meaning every service become single onion. */ - if (rend_service_allow_non_anonymous_connection(options) && - rend_service_non_anonymous_mode_enabled(options)) { + /* Check if we are configured in non anonymous mode meaning every service + * becomes a single onion service. */ + if (rend_service_non_anonymous_mode_enabled(options)) { config->is_single_onion = 1; + /* We will add support for IPv6-only v3 single onion services in a future + * Tor version. This won't catch "ReachableAddresses reject *4", but that + * option doesn't work anyway. */ + if (options->ClientUseIPv4 == 0 && config->version == HS_VERSION_THREE) { + log_warn(LD_CONFIG, "IPv6-only v3 single onion services are not " + "supported. Set HiddenServiceSingleHopMode 0 and " + "HiddenServiceNonAnonymousMode 0, or set ClientUseIPv4 1."); + goto err; + } } /* Success */ |