[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 Aug 19 19:07:43 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:
                                                 |  needs_revision
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.5.x-final
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:  teor                                 |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by neel):

 The problematic input to `fascist_firewall_choose_address_ls()` is the one
 which despite having a valid IPv4 address does not pass
 `fascist_firewall_allows_address_ap()`.

 I found a solution which I have tested to work: Add a flag to
 `fascist_firewall_choose_address_impl()`,
 `fascist_firewall_choose_address()`, and
 `fascist_firewall_choose_address_base()` called `check_fw` where we use
 `fascist_firewall_allows_address_ap()` if `check_fw` is `1`, or just
 `tor_addr_port_is_valid_ap()` if `check_fw` is `0`.

 All callers to `fascist_firewall_choose_address_base()` except for
 `fascist_firewall_choose_address_ls()` will set `check_fw` to `1`. The
 reason why `fascist_firewall_choose_address_ls()` uses `0` for `check_fw`
 is to prevent the regression we have in `make test-network-all`.

 It may not be a perfect solution (or it may), but it works while keeping
 our `fascist_firewall_choose_address_`* family of functions and not
 duplicating code.

 The same PR is used (https://github.com/torproject/tor/pull/256).

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23588#comment:47>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list