fascist_firewall_choose_address(const tor_addr_port_t *a,
                                const tor_addr_port_t *b,
                                int want_a,
                                firewall_connection_t fw_connection,
                                int pref_only, int pref_ipv6)
{
  const tor_addr_port_t *pref = fascist_firewall_choose_address_impl(
                                                                a, b, want_a,
                                                                fw_connection,
                                                                1, pref_ipv6);
  if (pref_only || pref) {
    /* If there is a preferred address, use it. If we can only use preferred
     * addresses, and neither address is preferred, pref will be NULL, and we
     * want to return NULL, so return it. */
    return pref;
  } else {
    /* If there's no preferred address, and we can return addresses that are
     * not preferred, use an address that's allowed */
    return fascist_firewall_choose_address_impl(a, b, want_a, fw_connection,
                                                0, pref_ipv6);
  }
}
fascist_firewall_choose_address(const tor_addr_port_t *a,
                                const tor_addr_port_t *b,
                                int want_a,
                                firewall_connection_t fw_connection,
                                int pref_only, int pref_ipv6)
{
  const tor_addr_port_t *pref = fascist_firewall_choose_address_impl(
                                                                a, b, want_a,
                                                                fw_connection,
                                                                1, pref_ipv6);
  if (pref_only || pref) {
     
    return pref;
  } else {
     
    return fascist_firewall_choose_address_impl(a, b, want_a, fw_connection,
                                                0, pref_ipv6);
  }
}