Update batman-adv and alfred to v2014.4

This commit is contained in:
Matthias Schiffer 2015-01-07 16:48:51 +01:00
parent b38e945fae
commit 69c94b3f9f
5 changed files with 61 additions and 171 deletions

View File

@ -0,0 +1,52 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Wed, 7 Jan 2015 16:40:43 +0100
Subject: Update batman-adv and alfred to v2014.4
diff --git a/alfred/Makefile b/alfred/Makefile
index 648a5ef..0a5fcac 100644
--- a/alfred/Makefile
+++ b/alfred/Makefile
@@ -11,9 +11,9 @@ include $(TOPDIR)/rules.mk
# The latest alfred git hash in PKG_REV can be obtained from http://git.open-mesh.org/alfred.git
#
PKG_NAME:=alfred
-PKG_VERSION:=2014.3.0
+PKG_VERSION:=2014.4.0
PKG_RELEASE:=0
-PKG_MD5SUM:=b8ab5677ed73d817b02b0e4fae10357a
+PKG_MD5SUM:=053cb5d9e7ca9384598e82944343dea2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
diff --git a/batctl/Makefile b/batctl/Makefile
index ae22286..1009b03 100644
--- a/batctl/Makefile
+++ b/batctl/Makefile
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=batctl
-PKG_VERSION:=2014.2.0
+PKG_VERSION:=2014.4.0
PKG_RELEASE:=1
-PKG_MD5SUM:=c196cf95b7324d9123b701a56b06b31d
+PKG_MD5SUM:=f3a14565699313258ee6ba3de783eb0a
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
diff --git a/batman-adv/Makefile b/batman-adv/Makefile
index 889dea7..0d5ed33 100644
--- a/batman-adv/Makefile
+++ b/batman-adv/Makefile
@@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=batman-adv
-PKG_VERSION:=2014.2.0
+PKG_VERSION:=2014.4.0
PKG_RELEASE:=1
-PKG_MD5SUM:=1243029b3a3e2f4fa721d1a59c2faaf5
+PKG_MD5SUM:=b1518e84ce530883d224c6ca4c673ce8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)

View File

@ -1,36 +0,0 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sat, 30 Aug 2014 19:46:55 +0200
Subject: Update batman-adv to v2014.3
diff --git a/batctl/Makefile b/batctl/Makefile
index ae22286..43c9098 100644
--- a/batctl/Makefile
+++ b/batctl/Makefile
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=batctl
-PKG_VERSION:=2014.2.0
+PKG_VERSION:=2014.3.0
PKG_RELEASE:=1
-PKG_MD5SUM:=c196cf95b7324d9123b701a56b06b31d
+PKG_MD5SUM:=7d2b8c129424c014d020c4b1a2add31b
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
diff --git a/batman-adv/Makefile b/batman-adv/Makefile
index 889dea7..6103cd2 100644
--- a/batman-adv/Makefile
+++ b/batman-adv/Makefile
@@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=batman-adv
-PKG_VERSION:=2014.2.0
+PKG_VERSION:=2014.3.0
PKG_RELEASE:=1
-PKG_MD5SUM:=1243029b3a3e2f4fa721d1a59c2faaf5
+PKG_MD5SUM:=e9ee1d42ff4b0254699c779668054bed
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)

View File

@ -1,16 +1,16 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sat, 26 Jul 2014 18:58:22 +0200
Date: Wed, 7 Jan 2015 16:45:09 +0100
Subject: alfred: adjust intervals
diff --git a/alfred/patches/0001-alfred-adjust-intervals.patch b/alfred/patches/0001-alfred-adjust-intervals.patch
new file mode 100644
index 0000000..e8ffd3a
index 0000000..a8e0b4d
--- /dev/null
+++ b/alfred/patches/0001-alfred-adjust-intervals.patch
@@ -0,0 +1,15 @@
+--- a/alfred.h
++++ b/alfred.h
+@@ -30,10 +30,10 @@
+@@ -32,10 +32,10 @@
+ #include "list.h"
+ #include "packet.h"
+
@ -21,5 +21,5 @@ index 0000000..e8ffd3a
+-#define ALFRED_SERVER_TIMEOUT 60
++#define ALFRED_SERVER_TIMEOUT 180
+ #define ALFRED_DATA_TIMEOUT 600
+ #define ALFRED_SOCK_PATH "/var/run/alfred.sock"
+ #define ALFRED_SOCK_PATH_DEFAULT "/var/run/alfred.sock"
+ #define NO_FILTER -1

View File

@ -1,15 +1,15 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Fri, 22 Aug 2014 13:52:42 +0200
Date: Wed, 7 Jan 2015 16:48:06 +0100
Subject: batman-adv: introduce 'no_rebroadcast' option
diff --git a/batman-adv/patches/0001-batman-adv-introduce-no_rebroadcast-option.patch b/batman-adv/patches/0001-batman-adv-introduce-no_rebroadcast-option.patch
new file mode 100644
index 0000000..cb5c633
index 0000000..cd79917
--- /dev/null
+++ b/batman-adv/patches/0001-batman-adv-introduce-no_rebroadcast-option.patch
@@ -0,0 +1,185 @@
+From 0c8001036a191efd3aa30493ba7e31f9eceb21e1 Mon Sep 17 00:00:00 2001
+Message-Id: <0c8001036a191efd3aa30493ba7e31f9eceb21e1.1418604208.git.mschiffer@universe-factory.net>
+From 5ba3f1eac041857deabe39432fdfe1a584bbdd81 Mon Sep 17 00:00:00 2001
+Message-Id: <5ba3f1eac041857deabe39432fdfe1a584bbdd81.1420645650.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] batman-adv: introduce 'no_rebroadcast' option
@ -191,5 +191,5 @@ index 0000000..cb5c633
+
+ /**
+--
+2.1.3
+2.2.1
+

View File

@ -1,126 +0,0 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Mon, 15 Dec 2014 01:44:23 +0100
Subject: batman-adv: add two more patches from the upstream 'maint' branch
diff --git a/batman-adv/patches/0002-batman-adv-Fix-double-fetch-in-RCU-version-of-hlist_.patch b/batman-adv/patches/0002-batman-adv-Fix-double-fetch-in-RCU-version-of-hlist_.patch
new file mode 100644
index 0000000..6fb2e63
--- /dev/null
+++ b/batman-adv/patches/0002-batman-adv-Fix-double-fetch-in-RCU-version-of-hlist_.patch
@@ -0,0 +1,54 @@
+From 2cbadf647c3836ad1cf62ec5554fbeee7b3d6ecd Mon Sep 17 00:00:00 2001
+Message-Id: <2cbadf647c3836ad1cf62ec5554fbeee7b3d6ecd.1418604208.git.mschiffer@universe-factory.net>
+In-Reply-To: <0c8001036a191efd3aa30493ba7e31f9eceb21e1.1418604208.git.mschiffer@universe-factory.net>
+References: <0c8001036a191efd3aa30493ba7e31f9eceb21e1.1418604208.git.mschiffer@universe-factory.net>
+From: Sven Eckelmann <sven@narfation.org>
+Date: Mon, 3 Nov 2014 23:16:19 +0100
+Subject: [PATCH] batman-adv: Fix double fetch in RCU version of hlist_*entry*
+
+The backported (<3.9) version of hlist_for_each_entry_rcu and
+hlist_for_each_entry_safe uses the new macro hlist_entry_safe. It is called
+with an ACCESS_ONCE parameter for the first parameter ptr. This disallows
+merging of the two loads which the current version of the macro uses.
+
+This is problematic because this macro must only generate one load. Otherwise
+with two contexts (or CPUs) following could happen:
+
+1. context 1 fetches the ptr to the last entry in hlist_entry_safe() and
+ accepts this non-NULL ptr
+
+2. context 2 deletes the last entry and terminates the list with NULL
+
+3. context 1 re-fetches the pointer, doesn't check for zero, calculates the
+ entry based on a NULL pointer
+
+4. context 1 crashes because it tries to load/write data from/to the invalid
+ address
+
+Instead use a single load to a temporary variable and do the NULL-check and
+calculation based on that one.
+
+Signed-off-by: Sven Eckelmann <sven@narfation.org>
+Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
+---
+ compat.h | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/compat.h b/compat.h
+index 5eb5fe6..79ba39b 100644
+--- a/compat.h
++++ b/compat.h
+@@ -345,7 +345,9 @@ static int __batadv_interface_tx(struct sk_buff *skb, \
+ dev->master;\
+ })
+ #define hlist_entry_safe(ptr, type, member) \
+- (ptr) ? hlist_entry(ptr, type, member) : NULL
++ ({ typeof(ptr) ____ptr = (ptr); \
++ ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
++ })
+
+ #undef hlist_for_each_entry
+ #define hlist_for_each_entry(pos, head, member) \
+--
+2.1.3
+
diff --git a/batman-adv/patches/0003-batman-adv-fix-delayed-foreign-originator-recognitio.patch b/batman-adv/patches/0003-batman-adv-fix-delayed-foreign-originator-recognitio.patch
new file mode 100644
index 0000000..2748f76
--- /dev/null
+++ b/batman-adv/patches/0003-batman-adv-fix-delayed-foreign-originator-recognitio.patch
@@ -0,0 +1,56 @@
+From 207d13673fd25e5ae1bc8bb42d1efd4ec4c2dc4d Mon Sep 17 00:00:00 2001
+Message-Id: <207d13673fd25e5ae1bc8bb42d1efd4ec4c2dc4d.1418604208.git.mschiffer@universe-factory.net>
+In-Reply-To: <0c8001036a191efd3aa30493ba7e31f9eceb21e1.1418604208.git.mschiffer@universe-factory.net>
+References: <0c8001036a191efd3aa30493ba7e31f9eceb21e1.1418604208.git.mschiffer@universe-factory.net>
+From: =?UTF-8?q?Linus=20L=C3=BCssing?= <linus.luessing@c0d3.blue>
+Date: Thu, 30 Oct 2014 06:23:40 +0100
+Subject: [PATCH] batman-adv: fix delayed foreign originator recognition
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Currently it can happen that the reception of an OGM from a new
+originator is not being accepted. More precisely it can happen that
+an originator struct gets allocated and initialized
+(batadv_orig_node_new()), even the TQ gets calculated and set correctly
+(batadv_iv_ogm_calc_tq()) but still the periodic orig_node purging
+thread will decide to delete it if it has a chance to jump between
+these two function calls.
+
+This is because batadv_orig_node_new() initializes the last_seen value
+to zero and its caller (batadv_iv_ogm_orig_get()) makes it visible to
+other threads by adding it to the hash table already.
+batadv_iv_ogm_calc_tq() will set the last_seen variable to the correct,
+current time a few lines later but if the purging thread jumps in between
+that it will think that the orig_node timed out and will wrongly
+schedule it for deletion already.
+
+If the purging interval is the same as the originator interval (which is
+the default:1 second), then this game can continue for several rounds
+until the random OGM jitter added enough difference between these
+two (in tests, two to about four rounds seemed common).
+
+Fixing this by initializing the last_seen variable of an orig_node
+to the current time before adding it to the hash table.
+
+Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
+Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
+---
+ originator.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/originator.c b/originator.c
+index 6a48451..648bdba 100644
+--- a/originator.c
++++ b/originator.c
+@@ -678,6 +678,7 @@ struct batadv_orig_node *batadv_orig_node_new(struct batadv_priv *bat_priv,
+ atomic_set(&orig_node->last_ttvn, 0);
+ orig_node->tt_buff = NULL;
+ orig_node->tt_buff_len = 0;
++ orig_node->last_seen = jiffies;
+ reset_time = jiffies - 1 - msecs_to_jiffies(BATADV_RESET_PROTECTION_MS);
+ orig_node->bcast_seqno_reset = reset_time;
+ #ifdef CONFIG_BATMAN_ADV_MCAST
+--
+2.1.3
+