[dns-operations] Using IP_RECVERR/IPV6_RECVERR on resolver client sockets
Florian Weimer
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
>> sockets
>>
>> Someone noticed that the Linux kernel only puts some networking-related
>> errors on the socket error queue for connected UDP sockets:
>>
>> <https://sourceware.org/bugzilla/show_bug.cgi?id=24047>
>
> Here, let me show you my 20 year old scar:
>
> https://github.com/libreswan/libreswan/blob/master/programs/pluto/server.c#L1120
>
> /* 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.
Thanks,
Florian
More information about the dns-operations
mailing list