From e6fc697d418be2053fe4b99518f2c704fde6165e Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 27 Jan 2019 16:28:23 +0100 Subject: [PATCH] batman-adv: upgrade package to latest release 2019.0 * support latest kernels (3.16 - 5.0) * coding style cleanups and refactoring * allow to enable debug tracing without full batman-adv debugfs support * enable inconsistency reporting for most netlink dump commands * bugs squashed: - avoid unnecessary kernel warning (panic) during detection of interface loops - work around incorrect ethernet header offset in transmit code path Signed-off-by: Sven Eckelmann --- batman-adv/Config.in | 2 +- batman-adv/Makefile | 6 +++--- batman-adv/src/compat-hacks.h | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/batman-adv/Config.in b/batman-adv/Config.in index a6c8ad3..127a020 100644 --- a/batman-adv/Config.in +++ b/batman-adv/Config.in @@ -90,7 +90,7 @@ config BATMAN_ADV_DEBUGFS config BATMAN_ADV_DEBUG bool "B.A.T.M.A.N. debugging" - depends on BATMAN_ADV_DEBUGFS + depends on PACKAGE_kmod-batman-adv help This is an option for use by developers; most people should say N here. This enables compilation of support for diff --git a/batman-adv/Makefile b/batman-adv/Makefile index 19cba8a..9ad8210 100644 --- a/batman-adv/Makefile +++ b/batman-adv/Makefile @@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batman-adv -PKG_VERSION:=2018.4 -PKG_RELEASE:=1 -PKG_HASH:=3500b4bc7d41ce1adef0b0684972a439d48b454ba78282e94df13ba90605484d +PKG_VERSION:=2019.0 +PKG_RELEASE:=0 +PKG_HASH:=3e97d8a771cdbd7b2df42c52b88e071eaa58b5d28eb4e17a4b13b6698debbdc0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION) diff --git a/batman-adv/src/compat-hacks.h b/batman-adv/src/compat-hacks.h index 4511184..718a15c 100644 --- a/batman-adv/src/compat-hacks.h +++ b/batman-adv/src/compat-hacks.h @@ -348,6 +348,27 @@ typedef unsigned __poll_t; #endif /* < KERNEL_VERSION(4, 16, 0) */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) + +static inline int batadv_access_ok(int type, const void __user *p, + unsigned long size) +{ + return access_ok(type, p, size); +} + +#ifdef access_ok +#undef access_ok +#endif + +#define access_ok_get(_1, _2, _3 , access_ok_name, ...) access_ok_name +#define access_ok(...) \ + access_ok_get(__VA_ARGS__, access_ok3, access_ok2)(__VA_ARGS__) + +#define access_ok2(addr, size) batadv_access_ok(VERIFY_WRITE, (addr), (size)) +#define access_ok3(type, addr, size) batadv_access_ok((type), (addr), (size)) + +#endif /* < KERNEL_VERSION(5, 0, 0) */ + /* */ #include -- 2.30.2