[SR-Users] DNS SRV when no NAPTR

Øyvind Kolbu oyvind.kolbu at usit.uio.no
Sun Sep 29 17:55:30 CEST 2013


On 2013-09-27 at 13:42, Øyvind Kolbu wrote:
> On 2013-09-27 at 11:49, Daniel-Constantin Mierla wrote:
> > Haven't got time to get back to it -- hope to happen soon.
> 
> I've taken a small peak and think I at least found some of the problem, but
> also got quite confused.
> 
> What is the relationship between
> dns_cache.c:dns_srv_sip_resolvehost() and
> dns_cache.c:dns_srv_sip_resolve()? They look very much copy and paste, with
> the same error in them. Both will only search for UDP records if *proto is
> not set. They also mangle the *proto value as they both set it to
> PROTO_UDP if it is unset, and the leaves it that way instead of resetting
> it to 0.
> 
> In resolve.c:no_naptr_srv_sip_resolvehost() a proper SRV lookup function is
> defined, but not used at least for the t_relay() case. Perhaps change both
> functions in dns_cache.c to use no_naptr_srv_sip_resolvehost?

The patch attached fixes the no NAPTR and no UDP case, but only when
use_dns_failover is set to off. We usually have it on, but I can't recall
why..

Anyhow the patch is rather trivial, just store *proto before overwriting it
and restore it before calling no_naptr_srv_sip_resolvehost.

-- 
Øyvind Kolbu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: no-naptr-no-udp-no-failover.patch
Type: text/x-diff
Size: 2519 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130929/16215ddc/attachment.patch>


More information about the sr-users mailing list