[asterisk-dev] [Code Review] 4528: dns: Add SRV recording parsing, sorting/weighting, and unit tests

Mark Michelson reviewboard at asterisk.org
Tue Mar 31 11:00:55 CDT 2015


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

Ship it!


Ship It!

- Mark Michelson


On March 31, 2015, 3:50 p.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4528/
> -----------------------------------------------------------
> 
> (Updated March 31, 2015, 3:50 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This change adds the following:
> 
> 1. As SRV records are added to a result the information is parsed and stored away in additional storage in the record. The SRV API can then be used to return this information.
> 2. Before invoking the DNS query callback the list of records on the result are sorted based on priority and weight.
> 3. Unit tests have been added which verify the record parsing, sorting, and weighting. There are also some off nominal which cover the cases when an invalid/corrupt record is received.
> 4. A unit test has also been added to res_resolver_unbound which adds an SRV record to a zone and confirms it is retrieved and parsed correctly.
> 
> 
> Diffs
> -----
> 
>   /trunk/tests/test_dns_srv.c PRE-CREATION 
>   /trunk/res/res_resolver_unbound.c 433815 
>   /trunk/main/dns_srv.c 433815 
>   /trunk/main/dns_core.c 433815 
>   /trunk/include/asterisk/dns_internal.h 433815 
> 
> Diff: https://reviewboard.asterisk.org/r/4528/diff/
> 
> 
> Testing
> -------
> 
> Executed unit tests and confirmed they pass.
> 
> 
> Thanks,
> 
> Joshua Colp
> 
>

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


More information about the asterisk-dev mailing list