[dns-operations] Mozilla Firefox and ANY queries

Mark Andrews marka at isc.org
Sun Mar 1 14:04:37 UTC 2015


In message <8761alvvsm.fsf at mid.deneb.enyo.de>, Florian Weimer writes:
> * Olafur Gudmundsson:
> 
> > That is the lamest justification I have seen in a long time.
> > Translation: We use crap API to lookup A records that does not give
> > us TTL values, which we want to use.  Asking for ANY on the other
> > hand gives us TTL
> >
> > #1 it is not hard to write a better DNS API, if all you care about
> > is DNS addresses
> 
> The final part is the problem.  Name resolution has to include other
> information source besides DNS, and it's difficult to merge this data
> with your own DNS resolver (whether you wrote it yourself, or it's
> some library you got from somewhere).

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.  

#ifdef AI_TTLOK
	if (res->ai_flags & AI_TTLOK) {
		ttl = res->ai_ttl;
		ttlok = 1;
	} else {
		ttl = 0;
		ttlok = 0;
	}
#else
	fallback code;
#endif

The hardest part is getting the OS developers to do it.

> _______________________________________________
> dns-operations mailing list
> dns-operations at lists.dns-oarc.net
> https://lists.dns-oarc.net/mailman/listinfo/dns-operations
> dns-jobs mailing list
> https://lists.dns-oarc.net/mailman/listinfo/dns-jobs
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: marka at isc.org



More information about the dns-operations mailing list