The branch main has been updated by kp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=c3d7bb5aca7749626b5c70dfa86ee8f07960f44a

commit c3d7bb5aca7749626b5c70dfa86ee8f07960f44a
Author:     Kristof Provost <[email protected]>
AuthorDate: 2024-01-20 14:37:40 +0000
Commit:     Kristof Provost <[email protected]>
CommitDate: 2024-01-20 21:22:21 +0000

    netipsec: fix LINT-NOINET build
    
    udp_ipsec_input() is used for INET6, so we need it even in NOINET
    builds. Build the relevant file if either of INET or INET6 are set.
---
 sys/modules/ipsec/Makefile   | 4 +++-
 sys/netipsec/ipsec_support.h | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/sys/modules/ipsec/Makefile b/sys/modules/ipsec/Makefile
index 7aaac6f79525..08a2e88d5794 100644
--- a/sys/modules/ipsec/Makefile
+++ b/sys/modules/ipsec/Makefile
@@ -5,6 +5,8 @@ KMOD=   ipsec
 SRCS=  if_ipsec.c ipsec.c ipsec_input.c ipsec_mbuf.c ipsec_mod.c \
        ipsec_output.c xform_ah.c xform_esp.c xform_ipcomp.c \
        opt_inet.h opt_inet6.h opt_ipsec.h opt_kern_tls.h opt_sctp.h
-SRCS.INET=     udpencap.c
+.if "${MK_INET}" != "no" || "${MK_INET6}" != "no"
+SRCS+= udpencap.c
+.endif
 
 .include <bsd.kmod.mk>
diff --git a/sys/netipsec/ipsec_support.h b/sys/netipsec/ipsec_support.h
index 905b2b6cd764..b7be62104d12 100644
--- a/sys/netipsec/ipsec_support.h
+++ b/sys/netipsec/ipsec_support.h
@@ -49,9 +49,11 @@ int ipsec_init_pcbpolicy(struct inpcb *);
 int ipsec_delete_pcbpolicy(struct inpcb *);
 int ipsec_copy_pcbpolicy(struct inpcb *, struct inpcb *);
 
-#ifdef INET
+#if defined(INET) || defined(INET6)
 int udp_ipsec_input(struct mbuf *, int, int);
 int udp_ipsec_pcbctl(struct inpcb *, struct sockopt *);
+#endif
+#ifdef INET
 int ipsec4_in_reject(const struct mbuf *, struct inpcb *);
 int ipsec4_input(struct mbuf *, int, int);
 int ipsec4_forward(struct mbuf *);

Reply via email to