From c3d7bb5aca7749626b5c70dfa86ee8f07960f44a Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Sat, 20 Jan 2024 15:37:40 +0100 Subject: [PATCH] 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 7aaac6f7952..08a2e88d579 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 diff --git a/sys/netipsec/ipsec_support.h b/sys/netipsec/ipsec_support.h index 905b2b6cd76..b7be62104d1 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 *);