Skip to content

Commit 52cd2a4

Browse files
makr73t8m
authored andcommitted
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 openssl#29292 Signed-off-by: Matthias Kraft <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Norbert Pocs <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#29334)
1 parent 26d138a commit 52cd2a4

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

crypto/bio/bss_dgram.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@
6464
#undef NO_RECVMSG
6565
#define NO_RECVMSG
6666
#endif
67-
#if (defined(__ANDROID_API__) && __ANDROID_API__ < 21) || defined(_AIX)
67+
#if (defined(__ANDROID_API__) && __ANDROID_API__ < 21)
68+
#undef NO_RECVMMSG
69+
#define NO_RECVMMSG
70+
#endif
71+
#if defined(_AIX) && !defined(_AIX72)
72+
/* AIX >= 7.2 provides sendmmsg() and recvmmsg(). */
6873
#undef NO_RECVMMSG
6974
#define NO_RECVMMSG
7075
#endif
@@ -130,7 +135,14 @@
130135
BIO_MAX(BIO_CMSG_ALLOC_LEN_1, \
131136
BIO_MAX(BIO_CMSG_ALLOC_LEN_2, BIO_CMSG_ALLOC_LEN_3))
132137
#endif
133-
#if (defined(IP_PKTINFO) || defined(IP_RECVDSTADDR)) && defined(IPV6_RECVPKTINFO)
138+
/*
139+
* Although AIX defines IP_RECVDSTADDR and IPV6_RECVPKTINFO, the
140+
* implementation requires IP_PKTINFO to be available for AF_INET.
141+
* For AF_INET6 there seem to be limitations how local addresses
142+
* are handled on AIX. So, disable the support for now.
143+
*/
144+
#if (defined(IP_PKTINFO) || defined(IP_RECVDSTADDR)) && defined(IPV6_RECVPKTINFO) \
145+
&& !defined(_AIX)
134146
#define SUPPORT_LOCAL_ADDR
135147
#endif
136148
#endif

0 commit comments

Comments
 (0)