[dns-operations] Using IP_RECVERR/IPV6_RECVERR on resolver client sockets
fweimer at redhat.com
Wed Jan 9 11:46:27 UTC 2019
* Paul Wouters:
> On Tue, 8 Jan 2019, Florian Weimer wrote:
>> Subject: [dns-operations] Using IP_RECVERR/IPV6_RECVERR on resolver client
>> Someone noticed that the Linux kernel only puts some networking-related
>> errors on the socket error queue for connected UDP sockets:
> Here, let me show you my 20 year old scar:
> /* Process any message on the MSG_ERRQUEUE
> * This information is generated because of the IP_RECVERR socket option.
> * The API is sparsely documented, and may be LINUX-only, and only on
> * fairly recent versions at that (hence the conditional compilation).
For a (stub) resolver, that's much easier: You just try the next server
when poll fails with POLLERR, like before. IP_RECVERR only reports more
errors. MSG_ERRQUEUE is entirely optional.
More information about the dns-operations