[asterisk-bugs] [JIRA] (ASTERISK-25565) DNS: System resolver only returns 1 record per result

Asterisk Team (JIRA) noreply at issues.asterisk.org
Wed Jul 27 10:20:04 CDT 2016


     [ https://issues.asterisk.org/jira/browse/ASTERISK-25565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asterisk Team updated ASTERISK-25565:
-------------------------------------

    Target Release Version/s: 14.0.0

> DNS: System resolver only returns 1 record per result
> -----------------------------------------------------
>
>                 Key: ASTERISK-25565
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25565
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/DNS
>    Affects Versions: SVN
>            Reporter: George Joseph
>            Assignee: George Joseph
>            Severity: Minor
>      Target Release: 14.0.0
>
>
> Orignally reported by Daniel Tryba
> With the following records, 
> {noformat}
> host -t NAPTR sip.itco.nl
> sip.itco.nl has NAPTR record 100 1 "s" "SIP+D2T" "" _sip._tcp.sip.itco.nl.
> sip.itco.nl has NAPTR record 10 1 "s" "SIP+D2U" "" _sip._udp.sip.itco.nl.
> {noformat}
> The following results are produced...
> {noformat}
> [Nov 16 10:26:34] DEBUG[22911]: res_pjsip/pjsip_resolver.c:460 sip_resolve: Performing SIP DNS resolution of target 'sip.itco.nl'
> [Nov 16 10:26:34] DEBUG[22911]: res_pjsip/pjsip_resolver.c:487 sip_resolve: Transport type for target 'sip.itco.nl' is 'Unspecified'
> [Nov 16 10:26:34] DEBUG[22911]: res_pjsip/pjsip_resolver.c:530 sip_resolve: [0x7f123000f308] Created resolution tracking for target 'sip.itco.nl'
> [Nov 16 10:26:34] DEBUG[22911]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7f123000f308] Added target 'sip.itco.nl' with record type '35', transport 'Unspecified', and port '0'
> [Nov 16 10:26:34] DEBUG[22911]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7f123000f308] Added target '_sip._tcp.sip.itco.nl' with record type '33', transport 'TCP', and port '5060'
> [Nov 16 10:26:34] DEBUG[22911]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7f123000f308] Added target '_sip._udp.sip.itco.nl' with record type '33', transport 'UDP', and port '5060'
> [Nov 16 10:26:34] DEBUG[22911]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7f123000f308] Added target 'sip.itco.nl' with record type '1', transport 'UDP', and port '5060'
> [Nov 16 10:26:34] DEBUG[22911]: res_pjsip/pjsip_resolver.c:582 sip_resolve: [0x7f123000f308] Starting initial resolution using parallel queries for target 'sip.itco.nl'
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:272 sip_resolve_callback: [0x7f123000f308] All parallel queries completed
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:360 sip_resolve_callback: [0x7f123000f308] NAPTR record received on target 'sip.itco.nl'
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7f123000f308] Added target '_sip._tcp.sip.itco.nl' with record type '33', transport 'TCP', and port '5060'
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:344 sip_resolve_callback: [0x7f123000f308] SRV record received on target '_sip._tcp.sip.itco.nl'
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7f123000f308] Added target 'sip0.itco.nl' with record type '1', transport 'TCP', and port '5060'
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:344 sip_resolve_callback: [0x7f123000f308] SRV record received on target '_sip._udp.sip.itco.nl'
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7f123000f308] Added target 'sip0.itco.nl' with record type '1', transport 'UDP', and port '5060'
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:308 sip_resolve_callback: [0x7f123000f308] A record being skipped on target 'sip.itco.nl' because NAPTR or SRV record exists
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:396 sip_resolve_callback: [0x7f123000f308] New queries added, performing parallel resolution again
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:272 sip_resolve_callback: [0x7f123000f308] All parallel queries completed
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:344 sip_resolve_callback: [0x7f123000f308] SRV record received on target '_sip._tcp.sip.itco.nl'
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7f123000f308] Added target 'sip0.itco.nl' with record type '1', transport 'TCP', and port '5060'
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:308 sip_resolve_callback: [0x7f123000f308] A record being skipped on target 'sip0.itco.nl' because NAPTR or SRV record exists
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:308 sip_resolve_callback: [0x7f123000f308] A record being skipped on target 'sip0.itco.nl' because NAPTR or SRV record exists
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:396 sip_resolve_callback: [0x7f123000f308] New queries added, performing parallel resolution again
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:272 sip_resolve_callback: [0x7f123000f308] All parallel queries completed
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:321 sip_resolve_callback: [0x7f123000f308] A record received on target 'sip0.itco.nl'
> [Nov 16 10:26:34] DEBUG[22891]: res_pjsip/pjsip_resolver.c:402 sip_resolve_callback: [0x7f123000f308] Resolution completed - 1 viable targets
> [Nov 16 10:26:34] DEBUG[22911]: res_pjsip/pjsip_resolver.c:201 sip_resolve_invoke_user_callback: [0x7f123000f308] Address '0' is 109.235.32.55:5060 with transport 'TCP'
> [Nov 16 10:26:34] DEBUG[22911]: res_pjsip/pjsip_resolver.c:207 sip_resolve_invoke_user_callback: [0x7f123000f308] Invoking user callback with '1' addresses
> [Nov 16 10:26:35] WARNING[22911]: res_pjsip_outbound_registration.c:833 handle_registration_response: Fatal response '401' received from 'sip:sip.itco.nl' on registration attempt to 'sip:tryba at sip.itco.nl', stopping outbound registration
> [Nov 16 10:26:38] DEBUG[22911]: res_pjsip/pjsip_resolver.c:460 sip_resolve: Performing SIP DNS resolution of target 'sip.itco.nl'
> [Nov 16 10:26:38] DEBUG[22911]: res_pjsip/pjsip_resolver.c:487 sip_resolve: Transport type for target 'sip.itco.nl' is 'Unspecified'
> [Nov 16 10:26:38] DEBUG[22911]: res_pjsip/pjsip_resolver.c:530 sip_resolve: [0x7f12300074b8] Created resolution tracking for target 'sip.itco.nl'
> [Nov 16 10:26:38] DEBUG[22911]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7f12300074b8] Added target 'sip.itco.nl' with record type '35', transport 'Unspecified', and port '0'
> [Nov 16 10:26:38] DEBUG[22911]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7f12300074b8] Added target '_sip._tcp.sip.itco.nl' with record type '33', transport 'TCP', and port '5060'
> [Nov 16 10:26:38] DEBUG[22911]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7f12300074b8] Added target '_sip._udp.sip.itco.nl' with record type '33', transport 'UDP', and port '5060'
> [Nov 16 10:26:38] DEBUG[22911]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7f12300074b8] Added target 'sip.itco.nl' with record type '1', transport 'UDP', and port '5060'
> [Nov 16 10:26:38] DEBUG[22911]: res_pjsip/pjsip_resolver.c:582 sip_resolve: [0x7f12300074b8] Starting initial resolution using parallel queries for target 'sip.itco.nl'
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:272 sip_resolve_callback: [0x7f12300074b8] All parallel queries completed
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:360 sip_resolve_callback: [0x7f12300074b8] NAPTR record received on target 'sip.itco.nl'
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7f12300074b8] Added target '_sip._udp.sip.itco.nl' with record type '33', transport 'UDP', and port '5060'
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:344 sip_resolve_callback: [0x7f12300074b8] SRV record received on target '_sip._tcp.sip.itco.nl'
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7f12300074b8] Added target 'sip1.itco.nl' with record type '1', transport 'TCP', and port '5060'
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:344 sip_resolve_callback: [0x7f12300074b8] SRV record received on target '_sip._udp.sip.itco.nl'
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7f12300074b8] Added target 'sip0.itco.nl' with record type '1', transport 'UDP', and port '5060'
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:308 sip_resolve_callback: [0x7f12300074b8] A record being skipped on target 'sip.itco.nl' because NAPTR or SRV record exists
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:396 sip_resolve_callback: [0x7f12300074b8] New queries added, performing parallel resolution again
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:272 sip_resolve_callback: [0x7f12300074b8] All parallel queries completed
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:344 sip_resolve_callback: [0x7f12300074b8] SRV record received on target '_sip._udp.sip.itco.nl'
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:177 sip_resolve_add: [0x7f12300074b8] Added target 'sip1.itco.nl' with record type '1', transport 'UDP', and port '5060'
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:308 sip_resolve_callback: [0x7f12300074b8] A record being skipped on target 'sip1.itco.nl' because NAPTR or SRV record exists
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:308 sip_resolve_callback: [0x7f12300074b8] A record being skipped on target 'sip0.itco.nl' because NAPTR or SRV record exists
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:396 sip_resolve_callback: [0x7f12300074b8] New queries added, performing parallel resolution again
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:272 sip_resolve_callback: [0x7f12300074b8] All parallel queries completed
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:321 sip_resolve_callback: [0x7f12300074b8] A record received on target 'sip1.itco.nl'
> [Nov 16 10:26:38] DEBUG[22891]: res_pjsip/pjsip_resolver.c:402 sip_resolve_callback: [0x7f12300074b8] Resolution completed - 1 viable targets
> [Nov 16 10:26:38] DEBUG[22911]: res_pjsip/pjsip_resolver.c:201 sip_resolve_invoke_user_callback: [0x7f12300074b8] Address '0' is 109.235.32.56:5060 with transport 'UDP'
> [Nov 16 10:26:38] DEBUG[22911]: res_pjsip/pjsip_resolver.c:207 sip_resolve_invoke_user_callback: [0x7f12300074b8] Invoking user callback with '1' addresses
> [Nov 16 10:26:38] WARNING[22911]: res_pjsip_outbound_registration.c:833 handle_registration_response: Fatal response '401' received from 'sip:sip.itco.nl' on registration attempt to 'sip:tryba at sip.itco.nl', stopping outbound registration
> {noformat}
> TCP is tried first even though UDP has a lower order.  This is actually because the system DNS resolver only returns 1 record per NAPTR query so there's nothing to sort.  It works OK with unbound as the resolver.
>  



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list