opnsense-src/sys/compat
Lexi Winter 8c81694af4 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

(cherry picked from commit ca63710d3668cf6f3cb4faf065d8b4eeffa028ad)
2024-04-27 06:59:46 -06:00
..
freebsd32 Abstract UIO allocation and deallocation. 2024-03-08 23:27:20 -05:00
ia32 sysentvec: add SV_SIGSYS flag 2023-10-09 06:24:31 +03:00
lindebugfs sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
linprocfs linprocfs: Avoid using a sysctl to get the CPU model string 2024-01-11 09:19:07 -05:00
linsysfs linsysfs(5): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux linux: ignore setsockopt(IPV6_RECVERR) 2024-04-27 06:59:46 -06:00
linuxkpi LinuxKPI: utsname.h add missing SPDX-License-Identifier 2024-04-22 17:00:53 +00:00
x86bios sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00