summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Horman <nhorman@openssl.org>2024-03-05 10:56:35 -0500
committerNeil Horman <nhorman@openssl.org>2024-03-07 08:29:48 -0500
commitc22c985e5d556f3521504e0ab3f1426bdd6afce1 (patch)
tree855c7a3b0225ecfba694ea851e234c76df188d53
parentcd102548246ce723b263396a5e717684480ff455 (diff)
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 <hlandau@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23753) (cherry picked from commit b5e076bee3c0445c108a6a35f077083ee42f9d80)
-rw-r--r--crypto/bio/bss_dgram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c
index 9f77c4abc2..01eaf43bed 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;