]> git.kaiwu.me - nginx.git/commitdiff
Fix setting the IPV6_DONTFRAG socket option master
authorRoman Arutyunyan <arut@nginx.com>
Wed, 8 Jul 2026 11:29:50 +0000 (15:29 +0400)
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>
Wed, 8 Jul 2026 17:23:26 +0000 (21:23 +0400)
The fix includes the socket option level (IPPROTO_IPV6) in the feature
test and the macro (NGX_HAVE_IPV6_DONTFRAG) in the
ngx_configure_listening_sockets() function.

Reported by Eric Fortis.

auto/unix
src/core/ngx_connection.c

index 6087e04fd6afc31bfde28bbeb1b90598cc177b64..40f9afa2f06e01253ab1d9cb8deb2c6027d55236 100644 (file)
--- a/auto/unix
+++ b/auto/unix
@@ -472,7 +472,7 @@ ngx_feature_incs="#include <sys/socket.h>
                   #include <netinet/in.h>"
 ngx_feature_path=
 ngx_feature_libs=
-ngx_feature_test="setsockopt(0, IPPROTO_IP, IPV6_DONTFRAG, NULL, 0)"
+ngx_feature_test="setsockopt(0, IPPROTO_IPV6, IPV6_DONTFRAG, NULL, 0)"
 . auto/feature
 
 
index c269a97e6124cfa40540e878eac2fd8250b59ece..33b9b1607772a53db7a2789a2c9602c9ccbc7d31 100644 (file)
@@ -1099,7 +1099,7 @@ ngx_configure_listening_sockets(ngx_cycle_t *cycle)
             }
         }
 
-#elif (NGX_HAVE_IP_DONTFRAG)
+#elif (NGX_HAVE_IPV6_DONTFRAG)
 
         if (ls[i].quic && ls[i].sockaddr->sa_family == AF_INET6) {
             value = 1;