keepalived uses kernel features that have been introduced over time,
but in order to still allow keepalived to be built and run on older
kernel versions it has many checks of what kernel features are available.

Set out below in chronological order are the features that have been added
to Linux that keepalived makes use of if they are available.

If in doubt about features, grep the source tree searching for "Linux". The
source (including configure.ac) attempts to document which kernel version
introduced features that are used conditionally.

At the end of this file is a list of kernel configure options that affect
functionality that keepalived uses.

Distros supported and kernel versions
=====================================
Distro		Oldest ver	Kernel ver	EOL
------		----------	----------	---
Ubuntu		24.10		6.11		July 2025
Ubuntu		24.04		6.8		May 2029
Ubuntu		22.04		5.15		April 2027
Ubuntu		20.04		5.4		April 2025
Debian		12		6.1		10-06-26
RHEL		9		5.14
RHEL		8		4.18.0		May 2029
CentOS		no support
CentOS Stream	always at least as recent as newest RHEL
Fedora		42		6.13
Fedora		41		6.11-6.12
Fedora		40		6.8-6.12	Four weeks after n+2 released
Fedora		39		6.5		26-11-24
Gentoo		Updated weekly
AlmaLinux	9.5		5.14		31-05-27			Follows RHEL
Alpine		3.18		6.1		09-05-25
Alpine		3.19		6.6		09-11-25
Alpine		3.20		6.6		01-04-26
Alpine		3.21		6.12		01-11-25
ArchLinux	2024.09.01	6.10.7		Dec 24 - appears to keep last 3 months of installation media, released at beginning of month
Mint		20		5.4		April 2025			https://en.wikipedia.org/wiki/Linux_Mint
Mint		21		5.15		April 2027			https://en.wikipedia.org/wiki/Linux_Mint
Mint		22		6.11		June 2029			https://en.wikipedia.org/wiki/Linux_Mint
openSUSE	15.5		5.14.21		31-12-24			https://en.wikipedia.org/wiki/OpenSUSE
openSUSE	15.6		6.4		31-12-25			https://en.wikipedia.org/wiki/OpenSUSE
SUSE		15 SP5		5.14.21		26-01-25			https://en.wikipedia.org/wiki/SUSE_Linux_Enterprise
SUSE		15 SP6		6.4.0		31-07-31			A service pack is supported for 6 months after release of next service pack (approx annual)
Manjaro		Rolling		4.19.322-6.13					https://en.wikipedia.org/wiki/Manjaro and https://manjaristas.org/branch_compare?q=%23kernels
Oracle		8		4.18		31-07-29			https://en.wikipedia.org/wiki/Oracle_Linux
Oracle		9		5.14		32-06-30			https://en.wikipedia.org/wiki/Oracle_Linux

=============================================================================

The oldest kernel version currently supported is Linux 4.18
-----------------------------------------------------------

./lib/rbtree.c:/* This is updated to Linux v4.18.10 lib/rbtree.c

IPV6_MULTICAST_ALL since Linux v4.20

dnl -- Linux/errqueue.h need sys/time.h before Linux < v5.1

dnl -- Since Linux 5.1
NFT_META_OIFKIND

dnl -- Since Linux 5.2
IPVS_DEST_ATTR_TUN_TYPE

dnl -- Since Linux 5.3
IP_VS_TUNNEL_ENCAP_FLAG_NOCSUM
IP_VS_CONN_F_TUNNEL_TYPE_GRE

??? dnl -- RedHat backported ENCAP_IP and ENCAP_IP6 without MPLS and ILA

dnl -- Since Linux 5.6 and libnftnl 1.1.6, nft 0.9.4
NFTNL_SET_DESC_CONCAT
NFTNL_SET_ELEM_KEY_END

dnl -- Since Linux 5.7
NFT_SET_CONCAT
NFTNL_SET_EXPR also libnftnl 1.1.7, nft 0.9.5

Since Linux 5.9
close_range syscall

Since Linux 5.11
CLOSE_RANGE_CLOEXEC

Since glibc 2.34
close_range() library function

Since Linux 5.18
IFA_PROTO

dnl ----[ Is HTTP_GET regex checking wanted? ]----
$PKG_CONFIG --exists libpcre2-8

/* Defined in kernel source file include/linux/sched.h but
 * not currently (Linux v5.10.12) exposed to userspace.
 * Also not currently exposed by glibc (v2.32). */
#define TASK_COMM_LEN 16

=============================================================================

Package versions
================

dnl -- RLIMIT_RTTIME - not defined in musl libc until v1.2.0

libipset v6.38	Used by Debian Buster, EOL ~2022
	 v6.29	Used by Ubuntu 16.04, EOL 04/21

=============================================================================

Kernel configuration requirements
---------------------------------
The following list is probably incomplete, and will be updated as other
options become known.

BPF
EPOLL
SIGNALFD
TIMERFD
SYSCTL
PROC_FS
INET
IP_MULTICAST
IPV6
IP_VS (unless --disable-lvs is specified)
  IP_VS suboptions to match the real_server/virtual_server configuration
NETFILTER_XTABLES - if strict_mode or no_accept.
  NETFILTER_XT options and IP_SET
IP_ADVANCED_ROUTER and various associated options if static/dynamic routes specified
FIB_RULES if static or dynamic rules are specified
NFTABLES
CN_PROC for vrrp track_process
MACVLAN
IPVLAN
