Brussels / 1 & 2 February 2025

schedule

getaddrinfo sucks, everything else is much worse


Historically, Firefox has relied on the getaddrinfo API for DNS resolution on most platforms. However, due to inherent limitations — such as the missing Time-To-Live (TTL) information — we sometimes had to resort to alternative APIs like DNSQuery_A on Windows. When implementing DNS over HTTPS (DoH), we developed our own DNS parser, which allowed Firefox to also resolve TXT and HTTPS records. But DoH isn't available to all our users. With HTTPS records becoming increasingly important, we decided to resolve HTTPS queries using system APIs like DNSQuery_A, res_query, res_nquery, and android_res_query, with the expectation that this would cover all supported platforms. This talk will delve into the lessons learned from this journey and explain why these platform specific APIs often fall short of expectations.

Speakers

Valentin Gosu