Skip to main content

getaddrinfo sucks, everything else is much worse

H.2213 | Day 1 | 15:00 - 15:25 | Speakers: Valentin Gosu

getaddrinfo sucks, everything else is much worse
A picture of a devroom at FOSDEM 2024
Open in browser
Get involved in the conversation!Join the chat

Notes

Abstract

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.

Attachments

Speakers

Valentin Gosu

Notice: The placeholder video image is licensed under CC BY-SA 4.0. The original image can be found hereChanges made to the image are: Cropped the image to a new ratio, part of the image was cut off.