[SR-Users] DNS SRV when no NAPTR

Daniel-Constantin Mierla miconda at gmail.com
Mon Sep 30 10:30:44 CEST 2013


Hello,

I'll check this one as well. Is this patch in addition to the previous 
one or combined?

Cheers,
Daniel

On 9/30/13 10:16 AM, Øyvind Kolbu wrote:
> On 2013-09-30 at 09:36, Daniel-Constantin Mierla wrote:
>> Hello,
>>
>> thanks for digging further, I will check it and commit if all looks good.
> Found an unrelated bug while testing more. If using dns_cache and
> use_dns_failover=off, it will not resolve A/AAAA-only hosts.
>
> Note that srv-lookups is still broken in the use_dns_failover=on case, as
> it only attempts one srv lookup, usually udp.
>
>  From the logs of a stock Kamailio lastest 4.0:
> DEBUG: <core> [dns_cache.c:569]: _dns_hash_find(): dns_hash_find(sip-services.uninett.no(23), 35), h=412
> DEBUG: <core> [resolve.c:757]: get_record(): get_record: lookup(sip-services.uninett.no, 35) failed
> DEBUG: <core> [dns_cache.c:897]: dns_cache_mk_bad_entry(): dns_cache_mk_bad_entry(sip-services.uninett.no, 35, 60, 1)
> DEBUG: <core> [dns_cache.c:830]: dns_cache_add(): dns_cache_add: adding sip-services.uninett.no(23) 35 (flags=1) at 412
> DEBUG: <core> [dns_cache.c:569]: _dns_hash_find(): dns_hash_find(_sip._udp.sip-services.uninett.no(33), 33), h=64
> DEBUG: <core> [resolve.c:757]: get_record(): get_record: lookup(_sip._udp.sip-services.uninett.no, 33) failed
> DEBUG: <core> [dns_cache.c:897]: dns_cache_mk_bad_entry(): dns_cache_mk_bad_entry(_sip._udp.sip-services.uninett.no, 33, 60, 1)
> DEBUG: <core> [dns_cache.c:830]: dns_cache_add(): dns_cache_add: adding _sip._udp.sip-services.uninett.no(33) 33 (flags=1) at 64
> ERROR: <core> [resolve.c:1728]: sip_hostport2su(): ERROR: sip_hostport2su: could not resolve hostname: "sip-services.uninett.no"
> ERROR: tm [ut.h:337]: uri2dst2(): failed to resolve "sip-services.uninett.no"
> ERROR: tm [t_fwd.c:1534]: t_forward_nonack(): ERROR: t_forward_nonack: failure to add branches
> DEBUG: tm [t_funcs.c:357]: t_relay_to(): ERROR:tm:t_relay_to:  t_forward_nonack returned error
> DEBUG: tm [t_funcs.c:374]: t_relay_to(): -478 error reply generation delayed
>
> And corresponding tcpdump:
> 27971+ NAPTR? sip-services.uninett.no. (41)
> 27971 0/1/0 (93)
> 57279+ SRV? _sip._udp.sip-services.uninett.no. (51)
> 57279 NXDomain 0/1/0 (103)
>
> With the attached patch, it works. See logs:
>
> DEBUG: <core> [dns_cache.c:569]: _dns_hash_find(): dns_hash_find(sip-services.uninett.no(23), 35), h=412
> DEBUG: <core> [resolve.c:757]: get_record(): get_record: lookup(sip-services.uninett.no, 35) failed
> DEBUG: <core> [dns_cache.c:897]: dns_cache_mk_bad_entry(): dns_cache_mk_bad_entry(sip-services.uninett.no, 35, 60, 1)
> DEBUG: <core> [dns_cache.c:830]: dns_cache_add(): dns_cache_add: adding sip-services.uninett.no(23) 35 (flags=1) at 412
> DEBUG: <core> [dns_cache.c:569]: _dns_hash_find(): dns_hash_find(_sip._udp.sip-services.uninett.no(33), 33), h=64
> DEBUG: <core> [resolve.c:757]: get_record(): get_record: lookup(_sip._udp.sip-services.uninett.no, 33) failed
> DEBUG: <core> [dns_cache.c:897]: dns_cache_mk_bad_entry(): dns_cache_mk_bad_entry(_sip._udp.sip-services.uninett.no, 33, 60, 1)
> DEBUG: <core> [dns_cache.c:830]: dns_cache_add(): dns_cache_add: adding _sip._udp.sip-services.uninett.no(33) 33 (flags=1) at 64
> DEBUG: <core> [dns_cache.c:569]: _dns_hash_find(): dns_hash_find(_sip._tcp.sip-services.uninett.no(33), 33), h=871
> DEBUG: <core> [resolve.c:757]: get_record(): get_record: lookup(_sip._tcp.sip-services.uninett.no, 33) failed
> DEBUG: <core> [dns_cache.c:897]: dns_cache_mk_bad_entry(): dns_cache_mk_bad_entry(_sip._tcp.sip-services.uninett.no, 33, 60, 1)
> DEBUG: <core> [dns_cache.c:830]: dns_cache_add(): dns_cache_add: adding _sip._tcp.sip-services.uninett.no(33) 33 (flags=1) at 871
> DEBUG: <core> [dns_cache.c:569]: _dns_hash_find(): dns_hash_find(sip-services.uninett.no(23), 1), h=412
> DEBUG: <core> [resolve.c:954]: get_record(): get_record: skipping 5 NS (p=0x82a6a59, end=0x82a6b86)
> DEBUG: <core> [resolve.c:970]: get_record(): get_record: parsing 9 ARs (p=0x82a6ac6, end=0x82a6b86)
> DEBUG: <core> [dns_cache.c:1779]: dns_get_related(): dns_get_related(0xb5d8a5f8 (sip-services.uninett.no, 1), 1, *0xb7c24e98) (0)
> DEBUG: <core> [dns_cache.c:872]: dns_cache_add_unsafe(): dns_cache_add: adding sip-services.uninett.no(23) 1 (flags=0) at 412
>
> and new tcpdump:
> 61793+ NAPTR? sip-services.uninett.no. (41)
> 61793 0/1/0 (93)
> 46996+ SRV? _sip._udp.sip-services.uninett.no. (51)
> 46996 NXDomain 0/1/0 (103)
> 1104+ SRV? _sip._tcp.sip-services.uninett.no. (51)
> 1104 NXDomain 0/1/0 (103)
> 22158+ A? sip-services.uninett.no. (41)
> 22158 1/5/9 A sip-services.uninett.no (358)
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Trainings - Berlin, Nov 25-28; Miami, Nov 18-20, 2013
   - more details about Kamailio trainings at http://www.asipto.com -

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130930/9bc690d5/attachment.html>


More information about the sr-users mailing list