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 <Matthias.Kraft@ibm.com>

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29334)
This commit is contained in:
Matthias Kraft 2025-12-05 17:52:28 +01:00 committed by Tomas Mraz
parent 26d138af72
commit 52cd2a49c5

View file

@ -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