Subject: Parse SOA records from ns_t_any response

Parse SOA records from ns_t_any response

From: Dron Rathore via c-ares <c-ares_at_cool.haxx.se>
Date: Fri, 5 May 2017 20:21:06 +0530

Hi all,

I am working on implementing a feature function which returns ns_t_any
response records, as c-ares doesn't have a parse_ns_t_any function I am
doing that by invoking individual parsers for each type of records.

However the SOA record parser is implemented in such a way that it only
takes 1 record because I guess it was written keeping in mind a T_SOA
response, however to add the ability to make this function parse out SOA
records from ns_t_any response we need to traverse through all the records.

I have completed the implementation of this here[1].

The basic idea of sticking to RFC that a ns_t_any too should return an SOA
record is something open for discussion but I have kept the functionality
intact as it was previously i.e the function returns ARES_EBADRESP if it
doesn't find a SOA record regardless of which response it is parsing i.e.
T_SOA or T_ANY.

[1]: https://github.com/c-ares/c-ares/pull/103

Best
Dron Rathore
Received on 2017-05-05