[asterisk-bugs] [JIRA] (ASTERISK-25565) DNS: System resolver only returns 1 record per result
George Joseph (JIRA)
noreply at issues.asterisk.org
Mon Nov 16 13:47:33 CST 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-25565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
George Joseph updated ASTERISK-25565:
-------------------------------------
Component/s: Core/DNS
> 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
>
> Orignally reported by Daniel Tryba
> When res_pjsip/pjsip_resolver.c resolves multiple NAPTR records, it uses the first one returned instead of honoring the order and preference fields.
> 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 UDP is only tried because of the 401 (which is due to my test setup)
>
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list