2013/7/31 Mark Delany <e9y_at_bravo.emu.st>
> (Resent. I don't think it made the list last time)
> I didn't get much discussion from my previous thread so I went ahead
> and made a minimalist patch to add ttl to the end of the structures of
> most of the missing ones.
> The changes to each parse method are the same. A ttl has been added to
> the end of the returned structure and the parse code has been changed
> to populate that field.
> Since the field is at the end of the structure, that should have no
> impact on existing code. I didn't see the point in inventing a whole
> new structure with the additional ttl field.
If you're linking to a shared library c-ares and the header version is
wrong, you're going to have a fun exploit vector.
A couple of thoughts:
* For the above reason, I think this should bump the SO file version in
* Indentation is mixed in the patch (some c-ares files are tab-indented,
but all changes use spaces.)
* ares_parse_soa_reply.c: Removing
aptr += ...
doesn't look safe here as the first
ares__expand_name_for_response(aptr, abuf, alen, &soa->nsname, &len);
* I think the man page should state the returned TTL is in seconds.
(Not everyone knows the DNS protocol.)
Received on 2013-08-05