From 69c1a4ebc369d79b2a58c25926187407a34b511e Mon Sep 17 00:00:00 2001 From: Alexander Færøy Date: Tue, 2 Jul 2019 20:18:19 +0200 Subject: Move parse logic for outbound addresses to before we handle PT's. This patch moves the logic for handling outbound addresses in torrc to before we handle pluggable transports. Since we need access to the values in OutboundBindAddress and friends for #5304 we have to parse these values before we spawn any PT's. This commit is code movement only. See: https://bugs.torproject.org/5304 --- src/app/config/config.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/app/config/config.c b/src/app/config/config.c index 46d98b2ab2..0706a0dbdc 100644 --- a/src/app/config/config.c +++ b/src/app/config/config.c @@ -2105,6 +2105,16 @@ options_act,(const or_options_t *old_options)) "in a non-anonymous mode. It will provide NO ANONYMITY."); } + /* 31851: OutboundBindAddressExit is relay-only */ + if (parse_outbound_addresses(options, 0, &msg) < 0) { + // LCOV_EXCL_START + log_warn(LD_BUG, "Failed parsing previously validated outbound " + "bind addresses: %s", msg); + tor_free(msg); + return -1; + // LCOV_EXCL_STOP + } + if (options->Bridges) { mark_bridge_list(); for (cl = options->Bridges; cl; cl = cl->next) { @@ -2266,16 +2276,6 @@ options_act,(const or_options_t *old_options)) tor_free(http_authenticator); } - /* 31851: OutboundBindAddressExit is relay-only */ - if (parse_outbound_addresses(options, 0, &msg) < 0) { - // LCOV_EXCL_START - log_warn(LD_BUG, "Failed parsing previously validated outbound " - "bind addresses: %s", msg); - tor_free(msg); - return -1; - // LCOV_EXCL_STOP - } - config_maybe_load_geoip_files_(options, old_options); if (geoip_is_loaded(AF_INET) && options->GeoIPExcludeUnknown) { -- cgit v1.2.3-54-g00ecf