tor/src/feature
David Goulet 803e769fb2 relay: Remove possible ORPorts duplicate from parsed list
Now that tor automatically binds to IPv4 _and_ IPv6, in order to avoid
breaking configurations, we sanitize the parsed lists for duplicate ORPorts.
It is possible to happen because we still allow this configuration;

  ORPort 9888
  ORPort [4242::1]:9888

Meaning that the first ORPort value will bind to 0.0.0.0:9888 _and_ [::]:9888
which would lead to an error when attempting to bind on [4242::1]:9888.
However, that configuration is accepted today and thus we must not break it.

To remedy, we now sanitize the parsed list and prioritize an ORPort that has
an explicit address over the global one.

A warning is emitted if such configuration pattern is found. This is only for
the ORPort.

Related to #33246

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-21 15:48:05 -04:00
..
api Revert "Restore feature where nt-services detect non-"run_tor" modes." 2020-01-17 08:39:49 -05:00
client relay: Use flags in relay_find_addr_to_publish() 2020-07-20 14:54:13 -04:00
control relay: Use flags in relay_find_addr_to_publish() 2020-07-20 14:54:13 -04:00
dirauth Rename router_get_advertised_*() functions. 2020-07-21 12:59:03 -04:00
dircache Use connection_describe() for log messages. 2020-07-16 09:02:10 -04:00
dirclient relay: Handle dir address suggestion with new interface 2020-07-20 14:54:13 -04:00
dircommon Use CONST_TO_* macros in more places. 2020-07-16 12:55:06 -04:00
dirparse Merge branch 'ticket40033_045_01_squashed' 2020-07-14 10:59:30 -04:00
hibernate Split core/include.am into per-subdirectory include.am files 2020-01-13 09:34:17 -05:00
hs Use connection_describe() for log messages. 2020-07-16 09:02:10 -04:00
hs_common shared_random: Improve fallback for client no-live-consensus case. 2020-03-03 14:35:01 +02:00
keymgt Split core/include.am into per-subdirectory include.am files 2020-01-13 09:34:17 -05:00
nodelist nodelist: Fix possible NULL deref 2020-07-16 13:23:03 -04:00
relay relay: Remove possible ORPorts duplicate from parsed list 2020-07-21 15:48:05 -04:00
rend addr: Use tor_addr_t instead of uint32_t for IPv4 2020-07-14 10:36:08 -04:00
stats conn: Fix doxygen comment in connstats.c 2020-07-14 09:09:14 -04:00
feature.md Move remaining CodeStructure.md contents into doxygen. 2020-06-26 10:11:42 -04:00