Date: Mon, 03 Aug 2026 11:28:34 +0000
From: Bruce M Simpson <bms@FreeBSD.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject: git: 4a59a0cf99bb - main - netinet6: Add a definition of struct ip6_hdr_pseudo{} for OCF compatibility.
Message-ID: <6a707b62.186ca.7f9db7bb@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by bms: URL: https://cgit.FreeBSD.org/src/commit/?id=4a59a0cf99bb9a48ccea62e9499186e892cf51bc commit 4a59a0cf99bb9a48ccea62e9499186e892cf51bc Author: Bruce M Simpson <bms@FreeBSD.org> AuthorDate: 2026-07-30 15:53:11 +0000 Commit: Bruce M Simpson <bms@FreeBSD.org> CommitDate: 2026-08-03 11:27:44 +0000 netinet6: Add a definition of struct ip6_hdr_pseudo{} for OCF compatibility. This change is intended to address @glebius comments from the original D55663. ip6_hdr_pseudo{} is referenced by certain OpenBSD OCF related components. I am using __aligned(4) and not __packed as urged by the late Hans-Petter Selasky. Use C99 types and style. We must eat the churn now cross-BSD compatibility is "Fade to Black". Put _Static_assert under #ifdef INVARIANTS to not disrupt regular compilation, as this resides in a commonly included header file. --- sys/netinet6/ip6_var.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index 9a861ab20647..769a254cdf52 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -66,6 +66,24 @@ #include <sys/epoch.h> #ifdef _KERNEL +/* + * For IPv6 pseudo header checksum; to be used by TCP-MD5, + * and for OCF source level compatibility with OpenBSD. + */ +struct ip6_hdr_pseudo { + struct in6_addr ip6ph_src; + struct in6_addr ip6ph_dst; + uint32_t ip6ph_len; + uint8_t ip6ph_zero[3]; + uint8_t ip6ph_nxt; +} __aligned(4); + +#ifdef INVARIANTS +/* Aligned size of pseudo-header must equal size of IPv6 header. */ +_Static_assert(sizeof(struct ip6_hdr_pseudo) == 40, + "IPv6 pseudo-header alignment failure"); +#endif + struct ip6asfrag; /* frag6.c */ TAILQ_HEAD(ip6fraghead, ip6asfrag);home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a707b62.186ca.7f9db7bb>
