[asterisk-dev] [Code Review] 4514: Add raw DNS answer to DNS results

Joshua Colp reviewboard at asterisk.org
Wed Mar 18 17:56:00 CDT 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4514/#review14738
-----------------------------------------------------------

Ship it!


Ship It!

- Joshua Colp


On March 18, 2015, 10:33 p.m., Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4514/
> -----------------------------------------------------------
> 
> (Updated March 18, 2015, 10:33 p.m.)
> 
> 
> Review request for Asterisk Developers and Joshua Colp.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Adding NAPTR and SRV support involves the need to decode domain-names in records into strings. The way this is typically done is through the dn_expand() function. The problem is that the dn_expand() function requires the entire DNS answer in order to decode the domain. The current DNS API does not grant access to the raw DNS answer, meaning that trying to parse NAPTR or SRV records is not possible.
> 
> This patch adds the DNS answer to the ast_dns_result structure, as well as a function to retrieve the DNS answer from the structure. The unit tests have been updated to add a phony DNS answer where necessary. The nominal DNS result test checks for the DNS answer to be what is expected. The off-nominal test for setting DNS results also ensures that a NULL answer or a 0 answer length will be rejected by the DNS core.
> 
> 
> Diffs
> -----
> 
>   /team/group/dns/tests/test_dns_recurring.c 433109 
>   /team/group/dns/tests/test_dns.c 433109 
>   /team/group/dns/res/res_resolver_unbound.c 433109 
>   /team/group/dns/main/dns_core.c 433109 
>   /team/group/dns/include/asterisk/dns_resolver.h 433109 
>   /team/group/dns/include/asterisk/dns_internal.h 433109 
>   /team/group/dns/include/asterisk/dns_core.h 433109 
> 
> Diff: https://reviewboard.asterisk.org/r/4514/diff/
> 
> 
> Testing
> -------
> 
> All unit tests continue to pass.
> 
> 
> Thanks,
> 
> Mark Michelson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150318/ed9616ac/attachment.html>


More information about the asterisk-dev mailing list