aboutsummaryrefslogtreecommitdiff
path: root/src/feature/relay
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2020-07-29 12:39:05 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2020-07-30 19:46:39 +0300
commit2bb9acca73f37a1d63485afa6bf1e52e37b333b9 (patch)
tree00d17e904c38fad5701bbfb9cc6af588a8b4ab99 /src/feature/relay
parentfc5fe094b1a330c30c951492d2401a8de1acfa97 (diff)
downloadtor-2bb9acca73f37a1d63485afa6bf1e52e37b333b9.tar.gz
tor-2bb9acca73f37a1d63485afa6bf1e52e37b333b9.zip
Write unittest for #40065.
Make the unit test pass by including an explicit IPv6 port and an implicit IPv4 port. See comments for more details.
Diffstat (limited to 'src/feature/relay')
-rw-r--r--src/feature/relay/relay_config.c2
-rw-r--r--src/feature/relay/relay_config.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/feature/relay/relay_config.c b/src/feature/relay/relay_config.c
index fc934b7879..711fbd14e5 100644
--- a/src/feature/relay/relay_config.c
+++ b/src/feature/relay/relay_config.c
@@ -183,7 +183,7 @@ describe_relay_port(const port_cfg_t *port)
*
* The following is O(n^2) but it is done at bootstrap or config reload and
* the list is not very long usually. */
-static void
+STATIC void
remove_duplicate_orports(smartlist_t *ports)
{
/* First we'll decide what to remove, then we'll remove it. */
diff --git a/src/feature/relay/relay_config.h b/src/feature/relay/relay_config.h
index c70c322d88..671399ac0a 100644
--- a/src/feature/relay/relay_config.h
+++ b/src/feature/relay/relay_config.h
@@ -84,6 +84,7 @@ int options_act_relay_dir(const struct or_options_t *old_options);
#ifdef RELAY_CONFIG_PRIVATE
+STATIC void remove_duplicate_orports(struct smartlist_t *ports);
STATIC int check_bridge_distribution_setting(const char *bd);
STATIC int have_enough_mem_for_dircache(const struct or_options_t *options,
size_t total_mem, char **msg);