fd7daa727126 breaks buildkernel when KERN_TLS is not defined
Date: Wed, 09 Feb 2022 10:43:10 UTC
Commit fd7daa727126 to /usr/src/sys/netinet/tcp_usrreq.c breaks buildkernel
when KERN_TLS is not defined.
This patch fixes it for me:
--- 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 = inp->inp_socket;
struct tcpcb *tp = intotcpcb(inp);
int error, opt, optval;
u_int ui;
struct tcp_info ti;
#ifdef KERN_TLS
+ struct socket *so = 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)) == 0,
("inp_flags == %x", inp->inp_flags));
+#ifdef KERN_TLS
KASSERT(so != NULL, ("inp_socket == NULL"));
+#endif
switch (sopt->sopt_level) {
#ifdef INET6
--
Gary Jennejohn