summaryrefslogtreecommitdiff
path: root/src/feature/relay/router.h
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-12-20 14:30:51 +1000
committerteor <teor@torproject.org>2020-03-21 03:36:39 +1000
commit861337fd6d286329537e07f667602992b82e921f (patch)
tree334fa641c454539caa3c30a82619e5e16d9a19f3 /src/feature/relay/router.h
parentee3d23c05a828dc693ead2dcf083c9091d502425 (diff)
downloadtor-861337fd6d286329537e07f667602992b82e921f.tar.gz
tor-861337fd6d286329537e07f667602992b82e921f.zip
router: Stop advertising incorrect auto IPv6 ORPorts
When IPv6 ORPorts are set to "auto", tor relays and bridges would advertise an incorrect port in their descriptor. This may be a low-severity memory safety issue, because the published port number may be derived from uninitialised or out-of-bounds memory reads. Fixes bug 32588; bugfix on 0.2.3.9-alpha.
Diffstat (limited to 'src/feature/relay/router.h')
-rw-r--r--src/feature/relay/router.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/feature/relay/router.h b/src/feature/relay/router.h
index bd6a8a012e..ab1f771017 100644
--- a/src/feature/relay/router.h
+++ b/src/feature/relay/router.h
@@ -59,6 +59,8 @@ int init_keys_client(void);
uint16_t router_get_active_listener_port_by_type_af(int listener_type,
sa_family_t family);
uint16_t router_get_advertised_or_port(const or_options_t *options);
+void router_get_advertised_ipv6_or_ap(const or_options_t *options,
+ tor_addr_port_t *ipv6_ap_out);
uint16_t router_get_advertised_or_port_by_af(const or_options_t *options,
sa_family_t family);
uint16_t router_get_advertised_dir_port(const or_options_t *options,