git: c9313a0bad68 - main - netlink: allow netlink to be build in the kernel

From: Alexander V. Chernikov <melifaro_at_FreeBSD.org>
Date: Fri, 23 Dec 2022 15:26:31 UTC
The branch main has been updated by melifaro:

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

commit c9313a0bad682351858e2e326cdb0f1d0bc2d1d8
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2022-12-22 14:51:36 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2022-12-23 15:24:44 +0000

    netlink: allow netlink to be build in the kernel
    
    Differential Revision: https://reviews.freebsd.org/D37781
---
 sys/conf/NOTES                      |  3 +++
 sys/conf/files                      | 12 ++++++++++++
 sys/conf/options                    |  1 +
 sys/modules/netlink/Makefile        |  2 +-
 sys/netlink/route/{route.c => rt.c} |  0
 5 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index dede651eaf9f..a1c0e71551ae 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -692,6 +692,9 @@ options		IPSEC_SUPPORT
 # TLS framing and encryption/decryption of data over TCP sockets.
 options		KERN_TLS		# TLS transmit and receive offload
 
+# Netlink kernel/user<>kernel/user messaging interface
+options		NETLINK
+
 #
 # SMB/CIFS requester
 # NETSMB enables support for SMB protocol, it requires LIBMCHAIN and LIBICONV
diff --git a/sys/conf/files b/sys/conf/files
index 29cf7851f561..eb5fe2055f8e 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -4471,6 +4471,18 @@ netipsec/xform_ipcomp.c		optional ipsec inet | ipsec inet6
 netipsec/xform_tcp.c		optional ipsec inet tcp_signature | \
 	 ipsec inet6 tcp_signature | ipsec_support inet tcp_signature | \
 	 ipsec_support inet6 tcp_signature
+netlink/netlink_domain.c	optional netlink
+netlink/netlink_generic.c	optional netlink
+netlink/netlink_io.c		optional netlink
+netlink/netlink_message_parser.c	optional netlink
+netlink/netlink_message_writer.c	optional netlink
+netlink/netlink_module.c	optional netlink
+netlink/netlink_route.c		optional netlink
+netlink/route/iface_drivers.c	optional netlink
+netlink/route/iface.c		optional netlink
+netlink/route/neigh.c		optional netlink
+netlink/route/nexthop.c		optional netlink
+netlink/route/rt.c		optional netlink
 netpfil/ipfw/dn_aqm_codel.c	optional inet dummynet
 netpfil/ipfw/dn_aqm_pie.c	optional inet dummynet
 netpfil/ipfw/dn_heap.c		optional inet dummynet
diff --git a/sys/conf/options b/sys/conf/options
index 85f456555447..1f5003507539 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -459,6 +459,7 @@ MBUF_PROFILING
 MBUF_STRESS_TEST
 MROUTING		opt_mrouting.h
 NFSLOCKD
+NETLINK
 PF_DEFAULT_TO_DROP	opt_pf.h
 ROUTE_MPATH		opt_route.h
 ROUTETABLES		opt_route.h
diff --git a/sys/modules/netlink/Makefile b/sys/modules/netlink/Makefile
index eb166ac42ea6..791b953e5b84 100644
--- a/sys/modules/netlink/Makefile
+++ b/sys/modules/netlink/Makefile
@@ -4,7 +4,7 @@ KMOD=	netlink
 SRCS =	netlink_module.c netlink_domain.c netlink_io.c \
 	netlink_message_parser.c netlink_message_writer.c  netlink_generic.c \
 	netlink_route.c route/iface.c route/iface_drivers.c route/neigh.c \
-	route/nexthop.c route/route.c
+	route/nexthop.c route/rt.c
 SRCS+=	opt_inet.h opt_inet6.h opt_route.h
 
 EXPORT_SYMS=
diff --git a/sys/netlink/route/route.c b/sys/netlink/route/rt.c
similarity index 100%
rename from sys/netlink/route/route.c
rename to sys/netlink/route/rt.c