hurd: Fix dgram_sendmmsg
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 13 Jan 2024 00:03:56 +0000 (01:03 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 16 Jan 2024 10:49:32 +0000 (11:49 +0100)
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 <matt@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23293)

crypto/bio/bss_dgram.c

index 4dd55ab33740f1ef8f3a194ca2ef3feea7757a73..26549305ac1aaec49a20d31c2e14f22a23663858 100644 (file)
 #   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