]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Always set the DF flag (not only when CMSG is available)
authorOndřej Surý <ondrej@isc.org>
Thu, 8 Oct 2020 06:26:28 +0000 (08:26 +0200)
committerOndřej Surý <ondrej@isc.org>
Thu, 8 Oct 2020 06:28:14 +0000 (08:28 +0200)
By mistake, we were setting the DF flag only when CMSG was available for
said platform.

lib/isc/unix/socket.c

index 62c8289932573c639d3a087c5170135d4b140a65..e3f1108242384256d220951f82ada2b8b7bca923 100644 (file)
@@ -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) {