[sr-dev] [kamailio/kamailio] core: DNS stop resolving NAPTR for IP addresses (#2541)

Julien Chavanton notifications at github.com
Thu Nov 5 15:35:33 CET 2020


@jchavanton commented on this pull request.

In the issue I am sharing a simple ACK with an IP in the RURI, I am guessing this is taking place everytime, since there is no NAPTR record for the IP address, maybe you need more than one DNS server or something, I wanted to avoid getting dragged in spending to much time since just by looking at the code I can see we are now accepting to do `dns_get_entry` on IP addresses.

However if this is raising more concerns, I can help to troubleshoot further. 

> @@ -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 */

Hi, thanks for having a look.

Since you moved `dns_get_entry` outside of the following check, it can now be executed without checking for IP.


```
if (((h->srv==0) && (h->a==0)) && /* first call */
			 proto && port && (*proto==0) && (*port==0)){
```






-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2541#pullrequestreview-524302084
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20201105/1bbdd9e4/attachment-0001.htm>


More information about the sr-dev mailing list