From: Matthias Kraft Date: Fri, 5 Dec 2025 16:52:28 +0000 (+0100) Subject: Enable send-/recvmmsg for AIX >= 7.2 and disable SUPPORT_LOCAL_ADDR. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52cd2a49c53ee6b08a8a76624f2a80f00248d679;p=thirdparty%2Fopenssl.git Enable send-/recvmmsg for AIX >= 7.2 and disable SUPPORT_LOCAL_ADDR. AIX doesn't support this implementation for local addresses. The AF_INET case is unimplemented when sending. The AF_INET6 case is limited to 110 messages. The limiting factor is currently unclear. Fixes #29292 Signed-off-by: Matthias Kraft Reviewed-by: Matt Caswell Reviewed-by: Norbert Pocs Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/29334) --- diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c index b7237338257..1f62ecf844b 100644 --- a/crypto/bio/bss_dgram.c +++ b/crypto/bio/bss_dgram.c @@ -64,7 +64,12 @@ #undef NO_RECVMSG #define NO_RECVMSG #endif -#if (defined(__ANDROID_API__) && __ANDROID_API__ < 21) || defined(_AIX) +#if (defined(__ANDROID_API__) && __ANDROID_API__ < 21) +#undef NO_RECVMMSG +#define NO_RECVMMSG +#endif +#if defined(_AIX) && !defined(_AIX72) +/* AIX >= 7.2 provides sendmmsg() and recvmmsg(). */ #undef NO_RECVMMSG #define NO_RECVMMSG #endif @@ -130,7 +135,14 @@ BIO_MAX(BIO_CMSG_ALLOC_LEN_1, \ BIO_MAX(BIO_CMSG_ALLOC_LEN_2, BIO_CMSG_ALLOC_LEN_3)) #endif -#if (defined(IP_PKTINFO) || defined(IP_RECVDSTADDR)) && defined(IPV6_RECVPKTINFO) +/* + * Although AIX defines IP_RECVDSTADDR and IPV6_RECVPKTINFO, the + * implementation requires IP_PKTINFO to be available for AF_INET. + * For AF_INET6 there seem to be limitations how local addresses + * are handled on AIX. So, disable the support for now. + */ +#if (defined(IP_PKTINFO) || defined(IP_RECVDSTADDR)) && defined(IPV6_RECVPKTINFO) \ + && !defined(_AIX) #define SUPPORT_LOCAL_ADDR #endif #endif