Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Feb 2022 12:21:38 +0100
From:      tuexen@freebsd.org
To:        gljennjohn@gmail.com
Cc:        current@freebsd.org
Subject:   Re: fd7daa727126 breaks buildkernel when KERN_TLS is not defined
Message-ID:  <1531B30A-E253-452F-8AB5-669DD5CCF0AC@freebsd.org>
In-Reply-To: <20220209114310.1a93fa85@ernst.home>
References:  <20220209114310.1a93fa85@ernst.home>

next in thread | previous in thread | raw e-mail | index | archive | help
> On 9. Feb 2022, at 11:43, Gary Jennejohn <gljennjohn@gmail.com> wrote:
>=20
> Commit fd7daa727126 to /usr/src/sys/netinet/tcp_usrreq.c breaks =
buildkernel
> when KERN_TLS is not defined.
Fixed in =
https://cgit.FreeBSD.org/src/commit/?id=3D528c76492402d9be8ec83a0a769f0d70=
e2a32f61

Thanks for reporting.

Best regards
Michael
> This patch fixes it for me:
>=20
> --- tcp_usrreq.c.orig	2022-02-09 10:25:46.851034000 +0000
> +++ tcp_usrreq.c	2022-02-09 10:30:27.541058000 +0000
> @@ -2119,12 +2119,12 @@
> int
> tcp_default_ctloutput(struct inpcb *inp, struct sockopt *sopt)
> {
> -	struct socket *so =3D inp->inp_socket;
> 	struct tcpcb *tp =3D intotcpcb(inp);
> 	int	error, opt, optval;
> 	u_int	ui;
> 	struct	tcp_info ti;
> #ifdef KERN_TLS
> +	struct socket *so =3D inp->inp_socket;
> 	struct tls_enable tls;
> #endif
> 	char	*pbuf, buf[TCP_LOG_ID_LEN];
> @@ -2136,7 +2136,9 @@
> 	INP_WLOCK_ASSERT(inp);
> 	KASSERT((inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) =3D=3D =
0,
> 	    ("inp_flags =3D=3D %x", inp->inp_flags));
> +#ifdef KERN_TLS
> 	KASSERT(so !=3D NULL, ("inp_socket =3D=3D NULL"));
> +#endif
>=20
> 	switch (sopt->sopt_level) {
> #ifdef INET6
>=20
> --=20
> Gary Jennejohn
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1531B30A-E253-452F-8AB5-669DD5CCF0AC>