Repository : ssh://git@diktynna/batman-adv On branches: main,main
commit b04ef22889ad1a0275616deeadd2ed68a8e253fd Author: Sven Eckelmann sven@narfation.org Date: Thu Dec 5 21:53:11 2024 +0100
batman-adv: Drop support for Linux < 4.19
The Linux Kernel 4.14 reached its end of life [1] after 6 years. Instead it is recommended to use at least kernel 5.5. It is also over 5 years old but still maintained by the stable kernel team. All older kernels (4.19 - v5.3) will be dropped to reduce the support overhead.
[1] https://lore.kernel.org/lkml/2024120520-preorder-untracked-6e5b@gregkh/T/
Signed-off-by: Sven Eckelmann sven@narfation.org
b04ef22889ad1a0275616deeadd2ed68a8e253fd README.external.rst | 2 +- compat-include/linux/compiler.h | 28 ---------------------------- compat-include/linux/igmp.h | 28 ---------------------------- compat-include/linux/skbuff.h | 22 ---------------------- compat-include/net/addrconf.h | 12 ------------ compat-include/net/genetlink.h | 14 -------------- 6 files changed, 1 insertion(+), 105 deletions(-)
diff --git a/README.external.rst b/README.external.rst index 8a174006..6d7c7c83 100644 --- a/README.external.rst +++ b/README.external.rst @@ -12,7 +12,7 @@ and as an external module. The external module allows to get new features without upgrading to a newer kernel version and to get batman-adv specific bug fixes for kernels that are not supported anymore. It compiles against and should work -with Linux 4.19 - 6.12. Supporting older versions is not +with Linux 5.4 - 6.12. Supporting older versions is not planned, but it's probably easy to backport it. If you work on a backport, feel free to contact us. :-)
diff --git a/compat-include/linux/compiler.h b/compat-include/linux/compiler.h deleted file mode 100644 index 7175cef9..00000000 --- a/compat-include/linux/compiler.h +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* Copyright (C) B.A.T.M.A.N. contributors: - * - * Marek Lindner, Simon Wunderlich - * - * This file contains macros for maintaining compatibility with older versions - * of the Linux kernel. - */ - -#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_COMPILER_H_ -#define _NET_BATMAN_ADV_COMPAT_LINUX_COMPILER_H_ - -#include <linux/version.h> -#include_next <linux/compiler.h> - -#if LINUX_VERSION_IS_LESS(5, 4, 0) - -#ifndef fallthrough -#if __GNUC__ > 7 && !defined(__CHECKER__) -# define fallthrough __attribute__((__fallthrough__)) -#else -# define fallthrough do {} while (0) /* fallthrough */ -#endif -#endif - -#endif /* LINUX_VERSION_IS_LESS(5, 4, 0) */ - -#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_COMPILER_H_ */ diff --git a/compat-include/linux/igmp.h b/compat-include/linux/igmp.h deleted file mode 100644 index ce21047e..00000000 --- a/compat-include/linux/igmp.h +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* Copyright (C) B.A.T.M.A.N. contributors: - * - * Marek Lindner, Simon Wunderlich - * - * This file contains macros for maintaining compatibility with older versions - * of the Linux kernel. - */ - -#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_IGMP_H_ -#define _NET_BATMAN_ADV_COMPAT_LINUX_IGMP_H_ - -#include <linux/version.h> -#include_next <linux/igmp.h> - -#if LINUX_VERSION_IS_LESS(5, 1, 0) - -static inline int batadv_ip_mc_check_igmp(struct sk_buff *skb) -{ - return ip_mc_check_igmp(skb, NULL); -} - -#define ip_mc_check_igmp(skb) \ - batadv_ip_mc_check_igmp(skb) - -#endif /* LINUX_VERSION_IS_LESS(5, 1, 0) */ - -#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_IGMP_H_ */ diff --git a/compat-include/linux/skbuff.h b/compat-include/linux/skbuff.h deleted file mode 100644 index eda2d181..00000000 --- a/compat-include/linux/skbuff.h +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* Copyright (C) B.A.T.M.A.N. contributors: - * - * Marek Lindner, Simon Wunderlich - * - * This file contains macros for maintaining compatibility with older versions - * of the Linux kernel. - */ - -#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_SKBUFF_H_ -#define _NET_BATMAN_ADV_COMPAT_LINUX_SKBUFF_H_ - -#include <linux/version.h> -#include_next <linux/skbuff.h> - -#if LINUX_VERSION_IS_LESS(5, 4, 0) - -#define nf_reset_ct nf_reset - -#endif /* LINUX_VERSION_IS_LESS(5, 4, 0) */ - -#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_SKBUFF_H_ */ diff --git a/compat-include/net/addrconf.h b/compat-include/net/addrconf.h index 080e1dda..18a02531 100644 --- a/compat-include/net/addrconf.h +++ b/compat-include/net/addrconf.h @@ -13,18 +13,6 @@ #include <linux/version.h> #include_next <net/addrconf.h>
-#if LINUX_VERSION_IS_LESS(5, 1, 0) - -static inline int batadv_ipv6_mc_check_mld(struct sk_buff *skb) -{ - return ipv6_mc_check_mld(skb, NULL); -} - -#define ipv6_mc_check_mld(skb) \ - batadv_ipv6_mc_check_mld(skb) - -#endif /* LINUX_VERSION_IS_LESS(5, 1, 0) */ - #if LINUX_VERSION_IS_LESS(5, 13, 0)
static bool batadv_mcast_mla_is_duplicate(u8 *mcast_addr, diff --git a/compat-include/net/genetlink.h b/compat-include/net/genetlink.h index 85376044..91c4c0b2 100644 --- a/compat-include/net/genetlink.h +++ b/compat-include/net/genetlink.h @@ -15,14 +15,6 @@
#if LINUX_VERSION_IS_LESS(5, 10, 0)
-#if LINUX_VERSION_IS_LESS(5, 2, 0) -enum genl_validate_flags { - GENL_DONT_VALIDATE_STRICT = BIT(0), - GENL_DONT_VALIDATE_DUMP = BIT(1), - GENL_DONT_VALIDATE_DUMP_STRICT = BIT(2), -}; -#endif /* LINUX_VERSION_IS_LESS(5, 2, 0) */ - struct batadv_genl_small_ops { int (*doit)(struct sk_buff *skb, struct genl_info *info); @@ -93,16 +85,10 @@ static inline int batadv_genl_register_family(struct batadv_genl_family *family) ops[i].cmd = family->small_ops[i].cmd; ops[i].internal_flags = family->small_ops[i].internal_flags; ops[i].flags = family->small_ops[i].flags; -#if LINUX_VERSION_IS_GEQ(5, 2, 0) ops[i].validate = family->small_ops[i].validate; -#else - ops[i].policy = family->policy; -#endif }
-#if LINUX_VERSION_IS_GEQ(5, 2, 0) family->family.policy = family->policy; -#endif
family->family.ops = ops; family->copy_ops = ops;