Skip to content

Commit

Permalink
core: DNS stop resolving NAPTR for IP addresses (#2541)
Browse files Browse the repository at this point in the history
  • Loading branch information
jchavanton committed Nov 5, 2020
1 parent 340374a commit 37f06f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/dns_cache.c
Expand Up @@ -3292,6 +3292,9 @@ inline static int dns_naptr_sip_resolve(struct dns_srv_handle* h, str* name,
}
try_lookup_naptr = 1;
}
/* check if it's an ip address, dns_srv_sip_resolve will return the right failure */
if (str2ip(name) || str2ip6(name))
goto naptr_not_found;
/* do naptr lookup */
if ((e=dns_get_entry(name, T_NAPTR))==0)
goto naptr_not_found;
Expand Down

0 comments on commit 37f06f0

Please sign in to comment.