Review Board 1.7.16


Add raw DNS answer to DNS results

Review Request #4514 - Created March 18, 2015 and submitted

Mark Michelson
/team/group/dns
Reviewers
asterisk-dev
jcolp
Asterisk
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.
All unit tests continue to pass.
Review request changed
Updated (March 19, 2015, 10:18 a.m.)
  • changed from pending to submitted
Committed in revision 433151

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.