Skip to content

Commit

Permalink
Gate setting of ipi_spec_dst on not building for freebsd
Browse files Browse the repository at this point in the history
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 #23753)
  • Loading branch information
nhorman committed Mar 7, 2024
1 parent f38d9b7 commit b5e076b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/bio/bss_dgram.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b5e076b

Please sign in to comment.