From 1672e851c848b3d11b01360e74eeda5526752ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 8 Oct 2020 08:26:28 +0200 Subject: [PATCH 1/2] Always set the DF flag (not only when CMSG is available) By mistake, we were setting the DF flag only when CMSG was available for said platform. --- lib/isc/unix/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index 62c8289932..e3f1108242 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -2348,8 +2348,6 @@ again: #endif /* IPV6_RECVPKTINFO */ #endif /* defined(USE_CMSG) */ - set_ip_dontfrag(sock); - #if defined(SET_RCVBUF) optlen = sizeof(size); if (getsockopt(sock->fd, SOL_SOCKET, SO_RCVBUF, (void *)&size, @@ -2416,6 +2414,8 @@ again: #endif /* ifdef IP_RECVTOS */ #endif /* defined(USE_CMSG) || defined(SET_RCVBUF) || defined(SET_SNDBUF) */ + set_ip_dontfrag(sock); + setup_done: inc_stats(manager->stats, sock->statsindex[STATID_OPEN]); if (sock->active == 0) { From 96ac91a18a6e506824c63d10a05e532d584ff5c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 8 Oct 2020 08:26:28 +0200 Subject: [PATCH 2/2] Clean the last remnant of ISC_PLATFORM_HAVEIPV6 macro In set_sndbuf() we were using ISC_PLATFORM_HAVEIPV6 macro that doesn't exist anymore, because we assume that IPv6 support is always available. --- lib/isc/unix/socket.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index e3f1108242..b599932d4f 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -2018,7 +2018,6 @@ set_sndbuf(void) { socklen_t len; fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); -#if defined(ISC_PLATFORM_HAVEIPV6) if (fd == -1) { switch (errno) { case EPROTONOSUPPORT: @@ -2033,7 +2032,6 @@ set_sndbuf(void) { break; } } -#endif /* if defined(ISC_PLATFORM_HAVEIPV6) */ if (fd == -1) { return; }