diff --git a/configure.ac b/configure.ac index 072f535a84..9b29cb4901 100644 --- a/configure.ac +++ b/configure.ac @@ -562,6 +562,9 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [AC_MSG_RESULT([no]) AC_CHECK_DECLS([UV_UDP_RECVMMSG], [], [], [[#include ]])]) +# libuv recverr support +AC_CHECK_DECLS([UV_UDP_LINUX_RECVERR], [], [], [[#include ]]) + # [pairwise: --enable-doh --with-libnghttp2=auto, --enable-doh --with-libnghttp2=yes, --disable-doh] AC_ARG_ENABLE([doh], [AS_HELP_STRING([--disable-doh], [enable DNS over HTTPS, requires libnghttp2 (default=yes)])], diff --git a/lib/isc/netmgr/udp.c b/lib/isc/netmgr/udp.c index 4c0848fdea..29a603a0dd 100644 --- a/lib/isc/netmgr/udp.c +++ b/lib/isc/netmgr/udp.c @@ -882,6 +882,10 @@ udp_connect_direct(isc_nmsocket_t *sock, isc__nm_uvreq_t *req) { uv_bind_flags |= UV_UDP_IPV6ONLY; } +#if HAVE_DECL_UV_UDP_LINUX_RECVERR + uv_bind_flags |= UV_UDP_LINUX_RECVERR; +#endif + r = uv_udp_bind(&sock->uv_handle.udp, &sock->iface.type.sa, uv_bind_flags); if (r != 0) {