Skip to content
Snippets Groups Projects
Commit 35ce4211 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Make address_is_invalid_destination recognize ipv6 addrs as valid.

parent 1cc77365
No related branches found
No related tags found
No related merge requests found
......@@ -902,6 +902,13 @@ address_is_invalid_destination(const char *address, int client)
return 0;
}
/* It might be an IPv6 address! */
{
tor_addr_t a;
if (tor_addr_parse(&a, address) >= 0)
return 0;
}
while (*address) {
if (TOR_ISALNUM(*address) ||
*address == '-' ||
......
......@@ -1334,7 +1334,7 @@ make_pending_resolve_cached(cached_resolve_t *resolve)
cached_resolve_t *new_resolve = tor_memdup(resolve,
sizeof(cached_resolve_t));
uint32_t ttl = UINT32_MAX;
new_resolve->expiry = 0; /* So that set_expiry won't croak. */
new_resolve->expire = 0; /* So that set_expiry won't croak. */
if (resolve->res_status_hostname == RES_STATUS_DONE_OK)
new_resolve->result_ptr.hostname =
tor_strdup(resolve->result_ptr.hostname);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment