From 91e8a3fb5cb4481697d372b98a274f3c233a7594 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 13 Jan 2024 01:03:56 +0100 Subject: [PATCH] hurd: Fix dgram_sendmmsg GNU/Hurd does not have IP_PKTINFO yet, thus SUPPORT_LOCAL_ADDR is undef, data->local_addr_enabled never set to 1, and thus the M_METHOD_RECVMSG method would end up raising BIO_R_LOCAL_ADDR_NOT_AVAILABLE immediately. Fixes #22872 Reviewed-by: Matt Caswell Reviewed-by: Hugo Landau (Merged from https://github.com/openssl/openssl/pull/23293) (cherry picked from commit 2f85736e9c66248528f132d46508f06a0bb8dd88) --- crypto/bio/bss_dgram.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c index 5195634fdfa..62a76d0b4ad 100644 --- a/crypto/bio/bss_dgram.c +++ b/crypto/bio/bss_dgram.c @@ -61,6 +61,11 @@ # define NO_RECVMMSG # endif # endif +# if defined(__GNU__) + /* GNU/Hurd does not have IP_PKTINFO yet */ + #undef NO_RECVMSG + #define NO_RECVMSG +# endif # if !defined(M_METHOD) # if defined(OPENSSL_SYS_WINDOWS) && defined(BIO_HAVE_WSAMSG) && !defined(NO_WSARECVMSG) # define M_METHOD M_METHOD_WSARECVMSG -- 2.47.3