Browse Source

Update routing packages (batman-adv v2016.5)

Also remove our own no_rebroadcast patch, as batman-adv v2016.5 now has a
more sophisticated rebroadcast suppression that should work automatically
in the most relevant cases.
Matthias Schiffer 7 years ago
parent
commit
2adf67edad

+ 2 - 1
modules

@@ -12,7 +12,8 @@ PACKAGES_GLUON_REPO=git://github.com/freifunk-gluon/packages.git
 PACKAGES_GLUON_COMMIT=03f06248c9eabdd69976d8d2b28698d0226b4461
 
 PACKAGES_ROUTING_REPO=git://github.com/openwrt-routing/packages.git
-PACKAGES_ROUTING_COMMIT=d848d49d2443448b147c564c2dd8f64433b5fb9c
+PACKAGES_ROUTING_BRANCH=lede-17.01
+PACKAGES_ROUTING_COMMIT=dd36dd47bbd75defcb3c517cafe7a19ee425f0af
 
 PACKAGES_LUCI_REPO=git://github.com/openwrt/luci.git
 PACKAGES_LUCI_BRANCH=lede-17.01

+ 10 - 12
patches/packages/routing/0003-batman-adv-decrease-maximum-fragment-size.patch → patches/packages/routing/0002-batman-adv-decrease-maximum-fragment-size.patch

@@ -2,29 +2,27 @@ From: Matthias Schiffer <mschiffer@universe-factory.net>
 Date: Thu, 6 Aug 2015 21:29:47 +0200
 Subject: batman-adv: decrease maximum fragment size
 
-diff --git a/batman-adv/patches/1002-batman-adv-decrease-maximum-fragment-size.patch b/batman-adv/patches/1002-batman-adv-decrease-maximum-fragment-size.patch
+diff --git a/batman-adv/patches/1001-batman-adv-decrease-maximum-fragment-size.patch b/batman-adv/patches/1001-batman-adv-decrease-maximum-fragment-size.patch
 new file mode 100644
-index 0000000000000000000000000000000000000000..1a0b561d73cdd06117b8327945ed78ffe8951c52
+index 0000000000000000000000000000000000000000..233c13b0bd4cef516763060d7e670650156a29d5
 --- /dev/null
-+++ b/batman-adv/patches/1002-batman-adv-decrease-maximum-fragment-size.patch
-@@ -0,0 +1,28 @@
-+From 32afa5d50ed6d5c3df288a0fb174ab512e9f9450 Mon Sep 17 00:00:00 2001
-+Message-Id: <32afa5d50ed6d5c3df288a0fb174ab512e9f9450.1481414736.git.mschiffer@universe-factory.net>
-+In-Reply-To: <eaeec9a5366d5e21fe07063ccede2edb7aa55e8e.1481414736.git.mschiffer@universe-factory.net>
-+References: <eaeec9a5366d5e21fe07063ccede2edb7aa55e8e.1481414736.git.mschiffer@universe-factory.net>
++++ b/batman-adv/patches/1001-batman-adv-decrease-maximum-fragment-size.patch
+@@ -0,0 +1,26 @@
++From d84be91875822203c31b7243bb403293b0b82105 Mon Sep 17 00:00:00 2001
++Message-Id: <d84be91875822203c31b7243bb403293b0b82105.1486839948.git.mschiffer@universe-factory.net>
 +From: Matthias Schiffer <mschiffer@universe-factory.net>
 +Date: Thu, 6 Aug 2015 22:27:01 +0200
-+Subject: [PATCH 2/2] batman-adv: decrease maximum fragment size
++Subject: [PATCH] batman-adv: decrease maximum fragment size
 +
 +---
 + net/batman-adv/main.h | 2 +-
 + 1 file changed, 1 insertion(+), 1 deletion(-)
 +
 +diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
-+index 09af21e..23ebb8e 100644
++index a6cc8040..5b785556 100644
 +--- a/net/batman-adv/main.h
 ++++ b/net/batman-adv/main.h
-+@@ -167,7 +167,7 @@ enum batadv_uev_type {
++@@ -168,7 +168,7 @@ enum batadv_uev_type {
 + /* Maximum number of fragments for one packet */
 + #define BATADV_FRAG_MAX_FRAGMENTS 16
 + /* Maxumim size of each fragment */
@@ -34,5 +32,5 @@ index 0000000000000000000000000000000000000000..1a0b561d73cdd06117b8327945ed78ff
 + #define BATADV_FRAG_TIMEOUT 10000
 + 
 +-- 
-+2.10.2
++2.11.1
 +

+ 0 - 228
patches/packages/routing/0002-batman-adv-introduce-no_rebroadcast-option.patch

@@ -1,228 +0,0 @@
-From: Matthias Schiffer <mschiffer@universe-factory.net>
-Date: Thu, 2 Apr 2015 20:24:14 +0200
-Subject: batman-adv: introduce 'no_rebroadcast' option
-
-diff --git a/batman-adv/files/lib/netifd/proto/batadv.sh b/batman-adv/files/lib/netifd/proto/batadv.sh
-index 1e0c9d0fe24d44c7f7cc9bddaf8065c60f680862..d0ab238d2652c05a08c5f4bede428a36cdedf345 100644
---- a/batman-adv/files/lib/netifd/proto/batadv.sh
-+++ b/batman-adv/files/lib/netifd/proto/batadv.sh
-@@ -7,19 +7,22 @@ init_proto "$@"
- proto_batadv_init_config() {
- 	proto_config_add_string "mesh"
- 	proto_config_add_string "routing_algo"
-+	proto_config_add_string "mesh_no_rebroadcast"
- }
- 
- proto_batadv_setup() {
- 	local config="$1"
- 	local iface="$2"
- 
--	local mesh routing_algo
--	json_get_vars mesh routing_algo
-+	local mesh routing_algo mesh_no_rebroadcast
-+	json_get_vars mesh routing_algo mesh_no_rebroadcast
- 
- 	[ -n "$routing_algo" ] || routing_algo="BATMAN_IV"
- 	echo "$routing_algo" > "/sys/module/batman_adv/parameters/routing_algo"
- 
- 	echo "$mesh" > "/sys/class/net/$iface/batman_adv/mesh_iface"
-+	[ -n "$mesh_no_rebroadcast" ] && echo "$mesh_no_rebroadcast" > "/sys/class/net/$iface/batman_adv/no_rebroadcast"
-+
- 	proto_init_update "$iface" 1
- 	proto_send_update "$config"
- }
-diff --git a/batman-adv/patches/1001-batman-adv-introduce-no_rebroadcast-option.patch b/batman-adv/patches/1001-batman-adv-introduce-no_rebroadcast-option.patch
-new file mode 100644
-index 0000000000000000000000000000000000000000..2d274d1241d9805b8a226aaceb5aae14235f3ca4
---- /dev/null
-+++ b/batman-adv/patches/1001-batman-adv-introduce-no_rebroadcast-option.patch
-@@ -0,0 +1,189 @@
-+From eaeec9a5366d5e21fe07063ccede2edb7aa55e8e Mon Sep 17 00:00:00 2001
-+Message-Id: <eaeec9a5366d5e21fe07063ccede2edb7aa55e8e.1481414736.git.mschiffer@universe-factory.net>
-+From: =?UTF-8?q?Linus=20L=C3=BCssing?= <linus.luessing@web.de>
-+Date: Tue, 24 Sep 2013 04:36:27 +0200
-+Subject: [PATCH 1/2] batman-adv: introduce 'no_rebroadcast' option
-+MIME-Version: 1.0
-+Content-Type: text/plain; charset=UTF-8
-+Content-Transfer-Encoding: 8bit
-+
-+This patch introduces a new sysfs option named "no_rebroadcast" on
-+a per hard interface basis. It allows manually enabling a split-horizon
-+like behaviour for the layer 2 multicast payload frames, in that
-+incoming multicast payload frames on such a hard interface are only
-+being rebroadcasted on all interfaces except the incoming one instead
-+of being rebroadcasted on all interfaces.
-+
-+Such an option should only be enabled if you are certain that these
-+rebroadcasts are unnecessary. This is usually the case for instance
-+for point-to-point wifi longshots or wired links.
-+
-+This option can especially safe a significant amount of upload overhead
-+if the neighbourhood on a link is rather large, for instance in some
-+transitive, symmetric VPN configurations.
-+
-+Using this option wrongly will break your mesh network, use this option
-+wisely and at your own risk!
-+
-+Signed-off-by: Linus Lüssing <linus.luessing@web.de>
-+---
-+ .../ABI/testing/sysfs-class-net-batman-adv         | 11 ++++
-+ net/batman-adv/hard-interface.c                    |  2 +
-+ net/batman-adv/send.c                              |  4 ++
-+ net/batman-adv/sysfs.c                             | 59 ++++++++++++++++++++++
-+ net/batman-adv/types.h                             |  1 +
-+ 5 files changed, 77 insertions(+)
-+
-+diff --git a/Documentation/ABI/testing/sysfs-class-net-batman-adv b/Documentation/ABI/testing/sysfs-class-net-batman-adv
-+index 8981068..738c46d 100644
-+--- a/Documentation/ABI/testing/sysfs-class-net-batman-adv
-++++ b/Documentation/ABI/testing/sysfs-class-net-batman-adv
-+@@ -28,3 +28,14 @@ description:
-+                 when estimating the link throughput using this interface.
-+                 If the value is set to 0 then batman-adv will try to
-+                 estimate the throughput by itself.
-++
-++What:           /sys/class/net/<iface>/batman-adv/no_rebroadcast
-++Date:           Sep 2013
-++Contact:        Linus Lüssing <linus.luessing@web.de>
-++Description:
-++                With this option set incoming multicast payload frames on
-++                <iface> are not being rebroadcasted on <iface> again. This
-++                option should be set on links which are known to be transitive
-++                and symmetric only, for instance point-to-point wifi longshots
-++                or wired links. Using this option wrongly is going to
-++                break your mesh network, use at your own risk!
-+diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
-+index 08ce361..b0e2896 100644
-+--- a/net/batman-adv/hard-interface.c
-++++ b/net/batman-adv/hard-interface.c
-+@@ -702,6 +702,8 @@ batadv_hardif_add_interface(struct net_device *net_dev)
-+ 
-+ 	batadv_v_hardif_init(hard_iface);
-+ 
-++	atomic_set(&hard_iface->no_rebroadcast, 0);
-++
-+ 	batadv_check_known_mac_addr(hard_iface->net_dev);
-+ 	kref_get(&hard_iface->refcount);
-+ 	list_add_tail_rcu(&hard_iface->list, &batadv_hardif_list);
-+diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
-+index 8d4e1f5..c8250f9 100644
-+--- a/net/batman-adv/send.c
-++++ b/net/batman-adv/send.c
-+@@ -636,6 +636,10 @@ static void batadv_send_outstanding_bcast_packet(struct work_struct *work)
-+ 		if (forw_packet->num_packets >= hard_iface->num_bcasts)
-+ 			continue;
-+ 
-++		if (atomic_read(&hard_iface->no_rebroadcast) &&
-++		    forw_packet->skb->dev == hard_iface->net_dev)
-++			continue;
-++
-+ 		if (!kref_get_unless_zero(&hard_iface->refcount))
-+ 			continue;
-+ 
-+diff --git a/net/batman-adv/sysfs.c b/net/batman-adv/sysfs.c
-+index 02d96f2..f91d09c 100644
-+--- a/net/batman-adv/sysfs.c
-++++ b/net/batman-adv/sysfs.c
-+@@ -136,6 +136,17 @@ struct batadv_attribute batadv_attr_vlan_##_name = {	\
-+ 	.store  = _store,				\
-+ }
-+ 
-++/* Use this, if you have customized show and store functions
-++ * for hard interface attrs
-++ */
-++#define BATADV_ATTR_HIF(_name, _mode, _show, _store)	\
-++struct batadv_attribute batadv_attr_hif_##_name = {	\
-++	.attr = {.name = __stringify(_name),		\
-++		 .mode = _mode },			\
-++	.show   = _show,				\
-++	.store  = _store,				\
-++};
-++
-+ /* Use this, if you have customized show and store functions */
-+ #define BATADV_ATTR(_name, _mode, _show, _store)	\
-+ struct batadv_attribute batadv_attr_##_name = {		\
-+@@ -295,6 +306,52 @@ ssize_t batadv_show_##_name(struct kobject *kobj,			\
-+ 	static BATADV_ATTR(_name, _mode, batadv_show_##_name,		\
-+ 			   batadv_store_##_name)
-+ 
-++#define BATADV_ATTR_HIF_STORE_BOOL(_name, _post_func)			\
-++ssize_t batadv_store_hif_##_name(struct kobject *kobj,			\
-++				 struct attribute *attr, char *buff,	\
-++				 size_t count)				\
-++{									\
-++	struct net_device *net_dev = batadv_kobj_to_netdev(kobj);	\
-++	struct batadv_hard_iface *hard_iface;				\
-++	size_t res;							\
-++									\
-++	hard_iface = batadv_hardif_get_by_netdev(net_dev);		\
-++	if (!hard_iface)						\
-++		return 0;						\
-++									\
-++	res = __batadv_store_bool_attr(buff, count, _post_func,		\
-++					      attr, &hard_iface->_name,	\
-++					      hard_iface->soft_iface);	\
-++	batadv_hardif_put(hard_iface);					\
-++	return res;							\
-++}
-++
-++#define BATADV_ATTR_HIF_SHOW_BOOL(_name)				\
-++ssize_t batadv_show_hif_##_name(struct kobject *kobj,			\
-++				struct attribute *attr, char *buff)	\
-++{									\
-++	struct net_device *net_dev = batadv_kobj_to_netdev(kobj);	\
-++	struct batadv_hard_iface *hard_iface;				\
-++	size_t res;							\
-++									\
-++	hard_iface = batadv_hardif_get_by_netdev(net_dev);		\
-++	if (!hard_iface)						\
-++		return 0;						\
-++									\
-++	res = sprintf(buff, "%s\n",					\
-++		      atomic_read(&hard_iface->_name) == 0 ?		\
-++				"disabled" : "enabled");		\
-++	batadv_hardif_put(hard_iface);					\
-++	return res;							\
-++}
-++
-++/* Use this, if you are going to turn a [name] in the vlan struct on or off */
-++#define BATADV_ATTR_HIF_BOOL(_name, _mode, _post_func)			\
-++	static BATADV_ATTR_HIF_STORE_BOOL(_name, _post_func)		\
-++	static BATADV_ATTR_HIF_SHOW_BOOL(_name)				\
-++	static BATADV_ATTR_HIF(_name, _mode, batadv_show_hif_##_name,	\
-++			       batadv_store_hif_##_name)
-++
-+ static int batadv_store_bool_attr(char *buff, size_t count,
-+ 				  struct net_device *net_dev,
-+ 				  const char *attr_name, atomic_t *attr,
-+@@ -1119,6 +1176,7 @@ static ssize_t batadv_show_throughput_override(struct kobject *kobj,
-+ static BATADV_ATTR(mesh_iface, S_IRUGO | S_IWUSR, batadv_show_mesh_iface,
-+ 		   batadv_store_mesh_iface);
-+ static BATADV_ATTR(iface_status, S_IRUGO, batadv_show_iface_status, NULL);
-++BATADV_ATTR_HIF_BOOL(no_rebroadcast, S_IRUGO | S_IWUSR, NULL);
-+ #ifdef CONFIG_BATMAN_ADV_BATMAN_V
-+ BATADV_ATTR_HIF_UINT(elp_interval, bat_v.elp_interval, S_IRUGO | S_IWUSR,
-+ 		     2 * BATADV_JITTER, INT_MAX, NULL);
-+@@ -1130,6 +1188,7 @@ static BATADV_ATTR(throughput_override, S_IRUGO | S_IWUSR,
-+ static struct batadv_attribute *batadv_batman_attrs[] = {
-+ 	&batadv_attr_mesh_iface,
-+ 	&batadv_attr_iface_status,
-++	&batadv_attr_hif_no_rebroadcast,
-+ #ifdef CONFIG_BATMAN_ADV_BATMAN_V
-+ 	&batadv_attr_elp_interval,
-+ 	&batadv_attr_throughput_override,
-+diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
-+index b3dd1a3..9ee810d 100644
-+--- a/net/batman-adv/types.h
-++++ b/net/batman-adv/types.h
-+@@ -156,6 +156,7 @@ struct batadv_hard_iface {
-+ 	struct hlist_head neigh_list;
-+ 	/* neigh_list_lock protects: neigh_list */
-+ 	spinlock_t neigh_list_lock;
-++	atomic_t no_rebroadcast;
-+ };
-+ 
-+ /**
-+-- 
-+2.10.2
-+

+ 0 - 44
patches/packages/routing/0004-batman-adv-use-kernel-specific-PKG_BUILD_DIR.patch

@@ -1,44 +0,0 @@
-From: Matthias Schiffer <mschiffer@universe-factory.net>
-Date: Fri, 27 Jan 2017 13:23:39 +0100
-Subject: batman-adv: use kernel-specific PKG_BUILD_DIR
-
-The batman-adv Makefile set a PKG_BUILD_DIR outside of KERNEL_BUILD_DIR;
-this could lead to batman-adv not being rebuilt when switching targets and
-thus kernel configurations. This resulted in ABI mismatches and
-occasionally broke the build with messages like the following:
-
-    Package kmod-batman-adv is missing dependencies for the following libraries:
-    crc16.ko
-
-Instead of setting a better PKG_BUILD_DIR ourselves, we can just remove
-the explicit PKG_BUILD_DIR definition and include kernel.mk before
-package.mk to get the default definition used by other kernel module
-packages.
-
-Reported-by: David Lutz <kpanic@hirnduenger.de>
-Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
-
-diff --git a/batman-adv/Makefile b/batman-adv/Makefile
-index 55f41fbfc222d4759bd008739ef0eff9e05b951a..ca34aa2241a979de836c7b6cd919416cf85225c3 100644
---- a/batman-adv/Makefile
-+++ b/batman-adv/Makefile
-@@ -11,17 +11,15 @@ include $(TOPDIR)/rules.mk
- PKG_NAME:=batman-adv
- 
- PKG_VERSION:=2016.4
--PKG_RELEASE:=1
-+PKG_RELEASE:=2
- PKG_MD5SUM:=1ed28d02ad86050d1518023e354737b6
- 
- PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
- PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
- PKG_LICENSE:=GPL-2.0
- 
--PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)
--
--include $(INCLUDE_DIR)/package.mk
- include $(INCLUDE_DIR)/kernel.mk
-+include $(INCLUDE_DIR)/package.mk
- 
- define KernelPackage/batman-adv
-   URL:=https://www.open-mesh.org/