Merge pull request #635 from ecsv/batadv-2021.0

batman-adv: upgrade packages to latest release 2021.0
This commit is contained in:
Simon Wunderlich 2021-01-28 22:25:57 +01:00 committed by GitHub
commit 2e602f7b33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 169 additions and 135 deletions

View file

@ -3,12 +3,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=alfred
PKG_VERSION:=2020.4
PKG_VERSION:=2021.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
PKG_HASH:=a22db18ec3ef6f12192d04bc6ca028c84e4a5951acb910fc5e17beefa24dc6ab
PKG_HASH:=a062c08da21e0a23ae0554d392c8147dfd2129ae6975a7f5004dc680fee2244b
PKG_MAINTAINER:=Simon Wunderlich <sw@simonwunderlich.de>
PKG_LICENSE:=GPL-2.0-only MIT

View file

@ -3,12 +3,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=batctl
PKG_VERSION:=2020.4
PKG_VERSION:=2021.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
PKG_HASH:=fc346005b3c19306ccf259329294d1d145a1294e04e9dbde2fb6c37697bb3917
PKG_HASH:=9cec8bf1952f885192749a9dc0318a54633b717aaf05c438d504efd83f5201e4
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Simon Wunderlich <sw@simonwunderlich.de>
@ -112,7 +112,6 @@ config-n := \
multicast_fanout \
multicast_forceflood \
multicast_mode \
nc_nodes \
neighbors \
network_coding \
orig_interval \
@ -155,7 +154,6 @@ config-tables := \
dat_cache \
gateways \
mcast_flags \
nc_nodes \
neighbors \
originators \
statistics \

View file

@ -0,0 +1,25 @@
From: Sven Eckelmann <sven@narfation.org>
Date: Thu, 28 Jan 2021 20:44:22 +0100
Subject: batctl: Fix build of routing_algo against musl
glibc is including the headers for the rtnetlink functionality. But musl
avoids this indirect include. The headers must therefore be included
explicitely.
Fixes: e0ccb9b575d9 ("batctl: Switch active routing algo list to netlink")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Origin: upstream, https://git.open-mesh.org/batctl.git/commit/b0044a6b2f8a762387d9b7408b1fe528f21c4ad7
diff --git a/routing_algo.c b/routing_algo.c
index 27458ffdd9b91decbecbe6ec5da8ffd14c863a35..b5e3ebb8c5a4743cd2c42634d79f8a4c6a8210db 100644
--- a/routing_algo.c
+++ b/routing_algo.c
@@ -9,6 +9,8 @@
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
+#include <linux/if_link.h>
+#include <linux/rtnetlink.h>
#include <netinet/if_ether.h>
#include <netlink/netlink.h>
#include <netlink/genl/genl.h>

View file

@ -65,17 +65,6 @@ config BATMAN_ADV_MCAST
reduce the air overhead while improving the reliability of
multicast messages.
config BATMAN_ADV_DEBUGFS
bool "batman-adv debugfs entries"
depends on PACKAGE_kmod-batman-adv
select KERNEL_DEBUG_FS
help
Enable this to export routing related debug tables via debugfs.
The information for each soft-interface and used hard-interface can be
found under batman_adv/
If unsure, say N.
config BATMAN_ADV_DEBUG
bool "B.A.T.M.A.N. debugging"
depends on PACKAGE_kmod-batman-adv
@ -86,17 +75,6 @@ config BATMAN_ADV_DEBUG
buffer. The output is controlled via the batadv netdev specific
log_level setting.
config BATMAN_ADV_SYSFS
bool "batman-adv sysfs entries"
depends on PACKAGE_kmod-batman-adv
help
Say Y here if you want to enable batman-adv device configuration and
status interface through sysfs attributes. It is replaced by the
batadv generic netlink family but still used by various userspace
tools and scripts.
If unsure, say Y.
config BATMAN_ADV_TRACING
bool "B.A.T.M.A.N. tracing support"
depends on PACKAGE_kmod-batman-adv

View file

@ -3,12 +3,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=batman-adv
PKG_VERSION:=2020.4
PKG_VERSION:=2021.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
PKG_HASH:=cdec428a2397c343fe4c08b1608479177497da7f60ba3cb9d2f1db64eb07b9b3
PKG_HASH:=5a989ba580897268373bd516b87b588061f344af773a0f6b038a3d8d2af028a1
PKG_EXTMOD_SUBDIRS:=net/batman-adv
PKG_MAINTAINER:=Simon Wunderlich <sw@simonwunderlich.de>
@ -49,13 +49,11 @@ endef
PKG_EXTRA_KCONFIG:= \
CONFIG_BATMAN_ADV=m \
CONFIG_BATMAN_ADV_DEBUG=$(if $(CONFIG_BATMAN_ADV_DEBUG),y,n) \
CONFIG_BATMAN_ADV_DEBUGFS=$(if $(CONFIG_BATMAN_ADV_DEBUGFS),y,n) \
CONFIG_BATMAN_ADV_BLA=$(if $(CONFIG_BATMAN_ADV_BLA),y,n) \
CONFIG_BATMAN_ADV_DAT=$(if $(CONFIG_BATMAN_ADV_DAT),y,n) \
CONFIG_BATMAN_ADV_MCAST=$(if $(CONFIG_BATMAN_ADV_MCAST),y,n) \
CONFIG_BATMAN_ADV_NC=$(if $(CONFIG_BATMAN_ADV_NC),y,n) \
CONFIG_BATMAN_ADV_BATMAN_V=$(if $(CONFIG_BATMAN_ADV_BATMAN_V),y,n) \
CONFIG_BATMAN_ADV_SYSFS=$(if $(CONFIG_BATMAN_ADV_SYSFS),y,n) \
CONFIG_BATMAN_ADV_TRACING=$(if $(CONFIG_BATMAN_ADV_TRACING),y,n) \
PKG_EXTRA_CFLAGS:= \

View file

@ -107,10 +107,10 @@ index f16355febac42294491531a3f8049bc680560d0c..d1f80cd88503cdd11e9051f2e90ea533
#endif /* _NET_BATMAN_ADV_COMPAT_NET_GENETLINK_H_ */
diff --git a/net/batman-adv/netlink.c b/net/batman-adv/netlink.c
index c7a55647b520e87d560bdcb29a644eef30f2855c..dc193618a761c0b451e860ca83921007d286e09b 100644
index 97bcf149633d850ff4fcece6d7dc0d799adb1444..a8f15c04826af1144db655887b754758fc5ab47a 100644
--- a/net/batman-adv/netlink.c
+++ b/net/batman-adv/netlink.c
@@ -1350,7 +1350,7 @@ static void batadv_post_doit(const struct genl_ops *ops, struct sk_buff *skb,
@@ -1351,7 +1351,7 @@ static void batadv_post_doit(const struct genl_ops *ops, struct sk_buff *skb,
}
}
@ -119,7 +119,7 @@ index c7a55647b520e87d560bdcb29a644eef30f2855c..dc193618a761c0b451e860ca83921007
{
.cmd = BATADV_CMD_GET_MESH,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -1484,8 +1484,8 @@ struct genl_family batadv_netlink_family __ro_after_init = {
@@ -1485,8 +1485,8 @@ struct genl_family batadv_netlink_family __ro_after_init = {
.pre_doit = batadv_pre_doit,
.post_doit = batadv_post_doit,
.module = THIS_MODULE,

View file

@ -0,0 +1,135 @@
From: Sven Eckelmann <sven@narfation.org>
Date: Thu, 28 Jan 2021 21:06:51 +0100
Subject: Revert "batman-adv: Add new include for min/max helpers"
The OpenWrt kernel sources and backports sources are currently missing this
header.
This reverts commit 1810de05310d5c5e9140f870ac21052f38bc06b8.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
diff --git a/compat-include/linux/minmax.h b/compat-include/linux/minmax.h
deleted file mode 100644
index 4b19479bc5ea12c5005485f623decfad90a85cff..0000000000000000000000000000000000000000
--- a/compat-include/linux/minmax.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2007-2020 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_MINMAX_H_
-#define _NET_BATMAN_ADV_COMPAT_LINUX_MINMAX_H_
-
-#include <linux/version.h>
-#if LINUX_VERSION_IS_GEQ(5, 10, 0)
-#include_next <linux/minmax.h>
-#else
-#include <linux/kernel.h>
-#endif
-
-#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_MINMAX_H_ */
diff --git a/net/batman-adv/bat_v.c b/net/batman-adv/bat_v.c
index e4455babe4c28f8c1527a17e825675183c37ea1d..22183e954647089ca72a941e744375d72e1f94b0 100644
--- a/net/batman-adv/bat_v.c
+++ b/net/batman-adv/bat_v.c
@@ -15,7 +15,6 @@
#include <linux/jiffies.h>
#include <linux/kref.h>
#include <linux/list.h>
-#include <linux/minmax.h>
#include <linux/netdevice.h>
#include <linux/netlink.h>
#include <linux/rculist.h>
diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c
index 0512ea6cd818c22768e601f446ff806cf863163b..79a7dfc32e76c511c5b5d8716cbebf64f6228d9d 100644
--- a/net/batman-adv/bat_v_elp.c
+++ b/net/batman-adv/bat_v_elp.c
@@ -18,7 +18,6 @@
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/kref.h>
-#include <linux/minmax.h>
#include <linux/netdevice.h>
#include <linux/nl80211.h>
#include <linux/prandom.h>
diff --git a/net/batman-adv/bat_v_ogm.c b/net/batman-adv/bat_v_ogm.c
index 798d659855d0bcc9d7638901fedeb77d830f1980..8c1148fc73d776c076bdb35896f5536d7378578d 100644
--- a/net/batman-adv/bat_v_ogm.c
+++ b/net/batman-adv/bat_v_ogm.c
@@ -18,7 +18,6 @@
#include <linux/kref.h>
#include <linux/list.h>
#include <linux/lockdep.h>
-#include <linux/minmax.h>
#include <linux/mutex.h>
#include <linux/netdevice.h>
#include <linux/prandom.h>
diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c
index e522f1fcfd9af04ee2d92b1b11ace6960d6f9c9f..ea40e54867573320d44e68524589454db553fb81 100644
--- a/net/batman-adv/fragmentation.c
+++ b/net/batman-adv/fragmentation.c
@@ -14,8 +14,8 @@
#include <linux/gfp.h>
#include <linux/if_ether.h>
#include <linux/jiffies.h>
+#include <linux/kernel.h>
#include <linux/lockdep.h>
-#include <linux/minmax.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index 0f186ddc15e30a9c9f5e4de44b96b2c7b27d8b86..b57e95c959cf064a74a01d25a24bdc495caa6324 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -18,7 +18,6 @@
#include <linux/kref.h>
#include <linux/limits.h>
#include <linux/list.h>
-#include <linux/minmax.h>
#include <linux/mutex.h>
#include <linux/netdevice.h>
#include <linux/printk.h>
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index ed9d87ce3407614e5e37922fe3039324adb027cc..edc0d53e9ba0a79ad0c37986e15ec362fb009f4f 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -23,7 +23,6 @@
#include <linux/kobject.h>
#include <linux/kref.h>
#include <linux/list.h>
-#include <linux/minmax.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/printk.h>
diff --git a/net/batman-adv/netlink.c b/net/batman-adv/netlink.c
index a8f15c04826af1144db655887b754758fc5ab47a..dc193618a761c0b451e860ca83921007d286e09b 100644
--- a/net/batman-adv/netlink.c
+++ b/net/batman-adv/netlink.c
@@ -23,7 +23,6 @@
#include <linux/kernel.h>
#include <linux/limits.h>
#include <linux/list.h>
-#include <linux/minmax.h>
#include <linux/netdevice.h>
#include <linux/netlink.h>
#include <linux/printk.h>
diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c
index d4e10005df6cd2936a3132e1ad7bd8bf3c1d99b6..db7e3774825b5f5871b23c0e4fa5ce7afb2accd6 100644
--- a/net/batman-adv/tp_meter.c
+++ b/net/batman-adv/tp_meter.c
@@ -23,7 +23,6 @@
#include <linux/kthread.h>
#include <linux/limits.h>
#include <linux/list.h>
-#include <linux/minmax.h>
#include <linux/netdevice.h>
#include <linux/param.h>
#include <linux/printk.h>

View file

@ -5,106 +5,6 @@
#include <linux/version.h> /* LINUX_VERSION_CODE */
#include <linux/types.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
#include <linux/netdevice.h>
#define netdev_master_upper_dev_link(dev, upper_dev, upper_priv, upper_info, extack) ({\
BUILD_BUG_ON(extack != NULL); \
netdev_master_upper_dev_link(dev, upper_dev, upper_priv, upper_info); \
})
#endif /* < KERNEL_VERSION(4, 15, 0) */
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
#ifndef sizeof_field
#define sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER))
#endif
#endif /* < KERNEL_VERSION(4, 16, 0) */
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)
#include_next <linux/igmp.h>
#include_next <net/addrconf.h>
static inline int batadv_ipv6_mc_check_mld1(struct sk_buff *skb)
{
return ipv6_mc_check_mld(skb, NULL);
}
static inline int batadv_ipv6_mc_check_mld2(struct sk_buff *skb,
struct sk_buff **skb_trimmed)
{
return ipv6_mc_check_mld(skb, skb_trimmed);
}
#define ipv6_mc_check_mld_get(_1, _2, ipv6_mc_check_mld_name, ...) ipv6_mc_check_mld_name
#define ipv6_mc_check_mld(...) \
ipv6_mc_check_mld_get(__VA_ARGS__, batadv_ipv6_mc_check_mld2, batadv_ipv6_mc_check_mld1)(__VA_ARGS__)
static inline int batadv_ip_mc_check_igmp1(struct sk_buff *skb)
{
return ip_mc_check_igmp(skb, NULL);
}
static inline int batadv_ip_mc_check_igmp2(struct sk_buff *skb,
struct sk_buff **skb_trimmed)
{
return ip_mc_check_igmp(skb, skb_trimmed);
}
#define ip_mc_check_igmp_get(_1, _2, ip_mc_check_igmp_name, ...) ip_mc_check_igmp_name
#define ip_mc_check_igmp(...) \
ip_mc_check_igmp_get(__VA_ARGS__, batadv_ip_mc_check_igmp2, batadv_ip_mc_check_igmp1)(__VA_ARGS__)
#endif /* < KERNEL_VERSION(5, 1, 0) */
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
#define batadv_softif_slave_add(__dev, __slave_dev, __extack) \
batadv_softif_slave_add(__dev, __slave_dev)
#endif /* < KERNEL_VERSION(4, 15, 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) */
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
#ifndef fallthrough
#if __GNUC__ > 7 && !defined(__CHECKER__)
# define fallthrough __attribute__((__fallthrough__))
#else
# define fallthrough do {} while (0) /* fallthrough */
#endif
#endif
#endif /* < KERNEL_VERSION(5, 4, 0) */
#if LINUX_VERSION_IS_LESS(5, 10, 0)
#include <linux/if_bridge.h>