From f8a749be091176d1548fd2dc09eda4901d152d29 Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 31 Aug 2021 19:03:23 -0700 Subject: [PATCH] Correctly set IPV6_V6ONLY setsockopt level for v6 options is IPPROTO_IPV6. --- src/i_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i_tcp.c b/src/i_tcp.c index 3d5d302f8..50d1a57fa 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -788,7 +788,7 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen // make it IPv6 ony opt = true; opts = (socklen_t)sizeof(opt); - if (setsockopt(s, SOL_SOCKET, IPV6_V6ONLY, (char *)&opt, opts)) + if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&opt, opts)) { CONS_Alert(CONS_WARNING, M_GetText("Could not limit IPv6 bind\n")); // I do not care anymore }