diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-03-19 20:04:53 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-03-20 07:56:26 -0400 |
commit | c478dc9b2f6c320cc21a10ffed0d7cc245fa933c (patch) | |
tree | 6af50e46872357a9e2f1a871c3206f960e570447 | |
parent | 250b8499b89217493d1b41c241ec81ae4e0fe206 (diff) | |
download | tor-c478dc9b2f6c320cc21a10ffed0d7cc245fa933c.tar.gz tor-c478dc9b2f6c320cc21a10ffed0d7cc245fa933c.zip |
Set *have_low_ports_out from stub port_parse_ports_relay().
Previously we just ignored this option, which would leave it unset,
and cause an assertion failure later on when running with the User
option.
Fixes bug 33668; bugfix on 0.4.3.1-alpha.
-rw-r--r-- | changes/bug33668 | 4 | ||||
-rw-r--r-- | src/feature/relay/relay_config.h | 17 |
2 files changed, 18 insertions, 3 deletions
diff --git a/changes/bug33668 b/changes/bug33668 new file mode 100644 index 0000000000..2b0830d6d8 --- /dev/null +++ b/changes/bug33668 @@ -0,0 +1,4 @@ + o Minor bugfixes (--disable-module-relay): + - Fix an assertion failure when Tor is build without the relay module, + and then invoked with the "User" option. Fixes bug 33668; bugfix on + 0.4.3.1-alpha. diff --git a/src/feature/relay/relay_config.h b/src/feature/relay/relay_config.h index 7a05561c26..c70c322d88 100644 --- a/src/feature/relay/relay_config.h +++ b/src/feature/relay/relay_config.h @@ -125,6 +125,20 @@ options_validate_relay_mode(const struct or_options_t *old_options, return 0; } +static inline int +port_parse_ports_relay(or_options_t *options, + char **msg, + smartlist_t *ports_out, + int *have_low_ports_out) +{ + (void)options; + (void)msg; + (void)ports_out; + if (*have_low_ports_out < 0) + *have_low_ports_out = 0; + return 0; +} + #define relay_get_dirportfrontpage() \ (NULL) #define relay_config_free_all() \ @@ -138,9 +152,6 @@ options_validate_relay_mode(const struct or_options_t *old_options, #define port_warn_nonlocal_ext_orports(ports, portname) \ (((void)(ports)),((void)(portname))) -#define port_parse_ports_relay(options, msg, ports_out, have_low_ports_out) \ - (((void)(options)),((void)(msg)),((void)(ports_out)), \ - ((void)(have_low_ports_out)),0) #define port_update_port_set_relay(options, ports) \ (((void)(options)),((void)(ports))) |