aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2024-07-19 19:14:41 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2024-07-21 08:53:19 +0000
commit6023bd1d52b6b928927f9d2c0e3017687b29a731 (patch)
tree7829a3f87a0387a9dc6f7df246460c0dbfd6fe48
parenteb0fdc77533db88d309a73f67f19222843597267 (diff)
netipsec: move declaration of the sysctl net.inet{,6}.ipsec nodes to header
Reviewed by: kp Sponsored by: NVIDIA networking Differential revision: https://reviews.freebsd.org/D46045
-rw-r--r--sys/netipsec/ipsec.c4
-rw-r--r--sys/netipsec/ipsec.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/netipsec/ipsec.c b/sys/netipsec/ipsec.c
index e22a3872d48d..9b18cedc7a80 100644
--- a/sys/netipsec/ipsec.c
+++ b/sys/netipsec/ipsec.c
@@ -172,8 +172,6 @@ VNET_DEFINE(int, natt_cksum_policy) = 0;
FEATURE(ipsec, "Internet Protocol Security (IPsec)");
FEATURE(ipsec_natt, "UDP Encapsulation of IPsec ESP Packets ('NAT-T')");
-SYSCTL_DECL(_net_inet_ipsec);
-
/* net.inet.ipsec */
SYSCTL_PROC(_net_inet_ipsec, IPSECCTL_DEF_POLICY, def_policy,
CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
@@ -257,8 +255,6 @@ VNET_DEFINE(int, ip6_ipsec_ecn) = 0; /* ECN ignore(-1)/forbidden(0)/allowed(1) *
VNET_DEFINE_STATIC(int, ip6_filtertunnel) = 0;
#define V_ip6_filtertunnel VNET(ip6_filtertunnel)
-SYSCTL_DECL(_net_inet6_ipsec6);
-
/* net.inet6.ipsec6 */
SYSCTL_PROC(_net_inet6_ipsec6, IPSECCTL_DEF_POLICY, def_policy,
CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
diff --git a/sys/netipsec/ipsec.h b/sys/netipsec/ipsec.h
index dfb334601331..749813518092 100644
--- a/sys/netipsec/ipsec.h
+++ b/sys/netipsec/ipsec.h
@@ -46,6 +46,7 @@
#include <sys/_lock.h>
#include <sys/_mutex.h>
#include <sys/_rwlock.h>
+#include <sys/sysctl.h>
#define IPSEC_ASSERT(_c,_m) KASSERT(_c, _m)
@@ -359,6 +360,9 @@ struct mbuf *m_makespace(struct mbuf *m0, int skip, int hlen, int *off);
caddr_t m_pad(struct mbuf *m, int n);
int m_striphdr(struct mbuf *m, int skip, int hlen);
+SYSCTL_DECL(_net_inet_ipsec);
+SYSCTL_DECL(_net_inet6_ipsec6);
+
#endif /* _KERNEL */
#ifndef _KERNEL