freebsd-src icon indicating copy to clipboard operation
freebsd-src copied to clipboard

linux: ignore setsockopt(IPV6_RECVERR)

Open llfw opened this issue 1 year ago • 0 comments

Under Linux, the socket options IP_RECVERR and IPV6_RECVERR are used to receive socket errors via a dedicated 'error queue' which can be retrieved via recvmsg(). FreeBSD does not support this functionality.

For IPv4, the sysctl compat.linux.ignore_ip_recverr can be set to 1 to silently ignore attempts to set IP_RECVERR and return success to the application, which is wrong, but is required for (among other things) a functional DNS client in recent versions of glibc.

Add support for ignoring IPV6_RECVERR, controlled by the same sysctl. This fixes DNS in Linux when using IPv6 resolvers.

llfw avatar Feb 13 '24 06:02 llfw