diff options
author | David Goulet <dgoulet@torproject.org> | 2021-02-11 16:12:59 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-02-11 16:12:59 -0500 |
commit | 80b33ae1ca148753558afa7bc8b43ba3df6d7948 (patch) | |
tree | 4512b6eb6d73eefe293156a9d190f6c0fcfa4481 /src/app | |
parent | 758000aa98432414847393420324fef983c66f1e (diff) | |
download | tor-80b33ae1ca148753558afa7bc8b43ba3df6d7948.tar.gz tor-80b33ae1ca148753558afa7bc8b43ba3df6d7948.zip |
config: Set flag for implicit port address
Fun bug where we thought we were using the default "false" value when an
implicit address was detected but if we had an explicit address before, the
flag was set to true and then we would only use that value.
And thus, for some configurations, implicit addresses would be flagged as
explicit and then configuring ports goes bad.
Related to #40289
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/config/config.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c index c7799ec1a2..fa74907b3d 100644 --- a/src/app/config/config.c +++ b/src/app/config/config.c @@ -6034,6 +6034,7 @@ port_parse_config(smartlist_t *out, port = (int) tor_parse_long(addrport, 10, 0, 65535, &ok, NULL); if (ok) { tor_addr_copy(&addr, &default_addr); + addr_is_explicit = false; } else if (tor_addr_port_lookup(addrport, &addr, &ptmp) == 0) { if (ptmp == 0) { log_warn(LD_CONFIG, "%sPort line has address but no port", portname); |