[tor-bugs] #23588 [Core Tor/Tor]: Write fascist_firewall_choose_address_ls() and use it in hs_get_extend_info_from_lspecs()
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sun Jul 29 23:51:10 UTC 2018
#23588: Write fascist_firewall_choose_address_ls() and use it in
hs_get_extend_info_from_lspecs()
-------------------------------------------------+-------------------------
Reporter: teor | Owner: neel
Type: defect | Status:
| assigned
Priority: Medium | Milestone: Tor:
| unspecified
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: prop224, tor-hs, single-onion, | Actual Points:
ipv6, 034-triage-20180328, |
034-removed-20180328 |
Parent ID: #23493 | Points: 1
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Comment (by teor):
Replying to [comment:8 neel]:
> In `ed25519_cert.h`, `link_specifier_t`/`link_specifier_st` looks like
this:
>
> {{{
> struct link_specifier_st {
> uint8_t ls_type;
> uint8_t ls_len;
> uint32_t un_ipv4_addr;
> uint16_t un_ipv4_port;
> uint8_t un_ipv6_addr[16];
> uint16_t un_ipv6_port;
> uint8_t un_legacy_id[20];
> uint8_t un_ed25519_id[32];
> TRUNNEL_DYNARRAY_HEAD(, uint8_t) un_unrecognized;
> uint8_t trunnel_error_code_;
> };
> }}}
>
> But the `fascist_firewall_choose_address_*` family of functions defines
DirPorts in the function, like this:
>
> {{{
> static void
> fascist_firewall_choose_address_base(const tor_addr_t *ipv4_addr,
> uint16_t ipv4_orport,
> uint16_t ipv4_dirport,
> const tor_addr_t *ipv6_addr,
> uint16_t ipv6_orport,
> uint16_t ipv6_dirport,
> firewall_connection_t
fw_connection,
> int pref_only,
> int pref_ipv6,
> tor_addr_port_t* ap)
> }}}
>
> Should I then assume the `ipv4_dirport` and `ipv6_dirport` is `0`?
Yes, link specifiers are only defined for ORPorts.
Also, #24732 will remove the IPv6 DirPort code, because it's unused.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23588#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list