HomeFreeBSD

linux: ignore setsockopt(IPV6_RECVERR)

Description

linux: ignore setsockopt(IPV6_RECVERR)

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.

Reviewed by: imp, Jose Luis Duran
Pull Request: https://github.com/freebsd/freebsd-src/pull/1118

Details

Provenance
lexi_le-fay.orgAuthored on Mon, Apr 22, 9:58 PM
impCommitted on Tue, Apr 23, 4:36 AM
Parents
rG50ecbc5142e1: libipsec: make const-correct
Branches
Unknown
Tags
Unknown