[dns-operations] Mozilla Firefox and ANY queries

Florian Weimer fw at deneb.enyo.de
Sun Mar 1 14:45:09 UTC 2015


* Mark Andrews:

> getaddrinfo was designed to extended.  It wouldn't be hard to add ttl
> information to getaddrinfo, just add a ai_ttl to the structure at the
> end and define a flag to say whether it is valid.  

struct addrinfo cannot be extended in this way because its size is
part of the ABI, and callers are even encouraged to allocate struct
addrinfo objects to pass the hints.

I've already found one Debian package which embeds a struct addrinfo
field in the middle of a struct defined in a header file (the shishi
Kerberos implementation).  Unfortunately, changing struct addrinfo in
the way you propose has an extremely high risk of breaking
applications.

It is possible to extend getaddrinfo without change the size of struct
addrinfo, but this will require accessor functions for the new fields.



More information about the dns-operations mailing list