From: Neil Horman Date: Tue, 5 Mar 2024 15:56:35 +0000 (-0500) Subject: Gate setting of ipi_spec_dst on not building for freebsd X-Git-Tag: openssl-3.3.0-alpha1~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5e076bee3c0445c108a6a35f077083ee42f9d80;p=thirdparty%2Fopenssl.git Gate setting of ipi_spec_dst on not building for freebsd some variants of FreeBSD (notably Dells OneFS) implement IP_PKTINFO partially, and as such the build breaks for those variants. specifically, it supports IP_PKTINFO, but the in_pktinfo struct has no defined ipi_spec_dst field. Work around this by gating the setting of that variable on not building for FreeBSD Fixes #23739 Reviewed-by: Hugo Landau Reviewed-by: Tim Hudson (Merged from https://github.com/openssl/openssl/pull/23753) --- diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c index 26549305ac1..c049883bf0a 100644 --- a/crypto/bio/bss_dgram.c +++ b/crypto/bio/bss_dgram.c @@ -1174,7 +1174,7 @@ static int pack_local(BIO *b, MSGHDR_TYPE *mh, const BIO_ADDR *local) { cmsg->cmsg_type = IP_PKTINFO; info = (struct in_pktinfo *)BIO_CMSG_DATA(cmsg); -# if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_CYGWIN) +# if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_CYGWIN) && !defined(__FreeBSD__) info->ipi_spec_dst = local->s_in.sin_addr; # endif info->ipi_addr.s_addr = 0;