addr_policy_append_reject_addr_filter(smartlist_t **dest,
                                      const tor_addr_t *addr,
                                      int ipv4_rules,
                                      int ipv6_rules)
{
  tor_assert(dest);
  tor_assert(addr);

  /* Only reject IP addresses which are public */
  if (tor_addr_is_public_for_reject(addr)) {

    /* Reject IPv4 addresses and IPv6 addresses based on the filters */
    int is_ipv4 = tor_addr_is_v4(addr);
    if ((is_ipv4 && ipv4_rules) || (!is_ipv4 && ipv6_rules)) {
      addr_policy_append_reject_addr(dest, addr);
    }
  }
}
addr_policy_append_reject_addr_filter(smartlist_t **dest,
                                      const tor_addr_t *addr,
                                      int ipv4_rules,
                                      int ipv6_rules)
{
  tor_assert(dest);
  tor_assert(addr);

   
  if (tor_addr_is_public_for_reject(addr)) {

     
    int is_ipv4 = tor_addr_is_v4(addr);
    if ((is_ipv4 && ipv4_rules) || (!is_ipv4 && ipv6_rules)) {
      addr_policy_append_reject_addr(dest, addr);
    }
  }
}