aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2019-07-02 20:18:19 +0200
committerDavid Goulet <dgoulet@torproject.org>2020-10-06 09:30:10 -0400
commit69c1a4ebc369d79b2a58c25926187407a34b511e (patch)
treec96662ee825f77a2edac10baa378c9bbda977dc4 /src
parentad087432995e1a55b9b9e63f28e295cbec528890 (diff)
downloadtor-69c1a4ebc369d79b2a58c25926187407a34b511e.tar.gz
tor-69c1a4ebc369d79b2a58c25926187407a34b511e.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/app/config/config.c20
1 files changed, 10 insertions, 10 deletions
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) {