[asterisk-dev] [Code Review] 4514: Add raw DNS answer to DNS results
Mark Michelson
reviewboard at asterisk.org
Thu Mar 19 10:16:29 CDT 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4514/
-----------------------------------------------------------
(Updated March 19, 2015, 10:16 a.m.)
Status
------
This change has been marked as submitted.
Review request for Asterisk Developers and Joshua Colp.
Changes
-------
Committed in revision 433150
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/20150319/f5261fad/attachment-0001.html>
More information about the asterisk-dev
mailing list