batman-adv: upgrade package to latest release 2012.4.0
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> git-svn-id: svn://svn.openwrt.org/openwrt/packages@34067 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
4851b4feac
commit
690db045ae
@ -10,11 +10,11 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=batman-adv
|
||||
|
||||
PKG_VERSION:=2012.3.0
|
||||
BATCTL_VERSION:=2012.3.0
|
||||
PKG_RELEASE:=3
|
||||
PKG_MD5SUM:=9f2d0bb2792fe0db012203d502e2085c
|
||||
BATCTL_MD5SUM:=fe9e6a3994539037b48afc5e3d31628c
|
||||
PKG_VERSION:=2012.4.0
|
||||
BATCTL_VERSION:=2012.4.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_MD5SUM:=24e922a64a507b146c32c585538407f2
|
||||
BATCTL_MD5SUM:=79d5aa796ae8b008a9fa42c27d4da2c1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
|
||||
|
@ -1,50 +0,0 @@
|
||||
From 716c8c9a8bb7ac1e30e959e50ed74caa7dabe60a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Linus=20L=C3=BCssing?= <linus.luessing@web.de>
|
||||
Date: Mon, 3 Sep 2012 22:20:31 +0200
|
||||
Subject: [PATCH] batman-adv: make batadv_test_bit() return 0 or 1 only
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
On some architectures test_bit() can return other values than 0 or 1:
|
||||
|
||||
With a generic x86 OpenWrt image in a kvm setup (batadv_)test_bit()
|
||||
frequently returns -1 for me, leading to batadv_iv_ogm_update_seqnos()
|
||||
wrongly signaling a protected seqno window.
|
||||
|
||||
This patch tries to fix this issue by making batadv_test_bit() return 0
|
||||
or 1 only.
|
||||
|
||||
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
|
||||
Acked-by: Sven Eckelmann <sven@narfation.org>
|
||||
---
|
||||
bitarray.h | 6 +++---
|
||||
1 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/bitarray.h b/bitarray.h
|
||||
index a081ce1..cebaae7 100644
|
||||
--- a/bitarray.h
|
||||
+++ b/bitarray.h
|
||||
@@ -20,8 +20,8 @@
|
||||
#ifndef _NET_BATMAN_ADV_BITARRAY_H_
|
||||
#define _NET_BATMAN_ADV_BITARRAY_H_
|
||||
|
||||
-/* returns true if the corresponding bit in the given seq_bits indicates true
|
||||
- * and curr_seqno is within range of last_seqno
|
||||
+/* Returns 1 if the corresponding bit in the given seq_bits indicates true
|
||||
+ * and curr_seqno is within range of last_seqno. Otherwise returns 0.
|
||||
*/
|
||||
static inline int batadv_test_bit(const unsigned long *seq_bits,
|
||||
uint32_t last_seqno, uint32_t curr_seqno)
|
||||
@@ -32,7 +32,7 @@ static inline int batadv_test_bit(const unsigned long *seq_bits,
|
||||
if (diff < 0 || diff >= BATADV_TQ_LOCAL_WINDOW_SIZE)
|
||||
return 0;
|
||||
else
|
||||
- return test_bit(diff, seq_bits);
|
||||
+ return test_bit(diff, seq_bits) != 0;
|
||||
}
|
||||
|
||||
/* turn corresponding bit on, so we can remember that we got the packet */
|
||||
--
|
||||
1.7.9.1
|
||||
|
@ -1,45 +0,0 @@
|
||||
From 86fa71a4985f60da5918e1f43136dae77852cdc3 Mon Sep 17 00:00:00 2001
|
||||
From: Def <def@laposte.net>
|
||||
Date: Thu, 20 Sep 2012 14:56:13 +0200
|
||||
Subject: [PATCH] batman-adv: Fix change mac address of soft iface.
|
||||
|
||||
Into function interface_set_mac_addr, the function tt_local_add was
|
||||
invoked before updating dev->dev_addr. The new MAC address was not
|
||||
tagged as NoPurge.
|
||||
|
||||
Signed-off-by: Def <def@laposte.net>
|
||||
---
|
||||
soft-interface.c | 7 +++++--
|
||||
1 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/soft-interface.c b/soft-interface.c
|
||||
index cf26e41..b762068 100644
|
||||
--- a/soft-interface.c
|
||||
+++ b/soft-interface.c
|
||||
@@ -100,18 +100,21 @@ static int batadv_interface_set_mac_addr(struct net_device *dev, void *p)
|
||||
{
|
||||
struct batadv_priv *bat_priv = netdev_priv(dev);
|
||||
struct sockaddr *addr = p;
|
||||
+ uint8_t old_addr[ETH_ALEN];
|
||||
|
||||
if (!is_valid_ether_addr(addr->sa_data))
|
||||
return -EADDRNOTAVAIL;
|
||||
|
||||
+ memcpy(old_addr, dev->dev_addr, ETH_ALEN);
|
||||
+ memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
|
||||
+
|
||||
/* only modify transtable if it has been initialized before */
|
||||
if (atomic_read(&bat_priv->mesh_state) == BATADV_MESH_ACTIVE) {
|
||||
- batadv_tt_local_remove(bat_priv, dev->dev_addr,
|
||||
+ batadv_tt_local_remove(bat_priv, old_addr,
|
||||
"mac address changed", false);
|
||||
batadv_tt_local_add(dev, addr->sa_data, BATADV_NULL_IFINDEX);
|
||||
}
|
||||
|
||||
- memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
|
||||
dev->addr_assign_type &= ~NET_ADDR_RANDOM;
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
1.7.9.1
|
||||
|
@ -1,71 +0,0 @@
|
||||
From 6c9d9eeac0fb5d6625256cd119d0a4994c63e965 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Linus=20L=C3=BCssing?= <linus.luessing@web.de>
|
||||
Date: Tue, 18 Sep 2012 03:01:08 +0200
|
||||
Subject: [PATCH] batman-adv: Fix symmetry check / route flapping in multi
|
||||
interface setups
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
If receiving an OGM from a neighbor other than the currently selected
|
||||
and if it has the same TQ then we are supposed to switch if this
|
||||
neighbor provides a more symmetric link than the currently selected one.
|
||||
|
||||
However this symmetry check currently is broken if the interface of the
|
||||
neighbor we received the OGM from and the one of the currently selected
|
||||
neighbor differ: We are currently trying to determine the symmetry of the
|
||||
link towards the selected router via the link we received the OGM from
|
||||
instead of just checking via the link towards the currently selected
|
||||
router.
|
||||
|
||||
This leads to way more route switches than necessary and can lead to
|
||||
permanent route flapping in many common multi interface setups.
|
||||
|
||||
This patch fixes this issue by using the right interface for this
|
||||
symmetry check.
|
||||
|
||||
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
|
||||
---
|
||||
bat_iv_ogm.c | 13 +++++++------
|
||||
1 files changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/bat_iv_ogm.c b/bat_iv_ogm.c
|
||||
index e877af8..469daab 100644
|
||||
--- a/bat_iv_ogm.c
|
||||
+++ b/bat_iv_ogm.c
|
||||
@@ -642,7 +642,8 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv,
|
||||
struct batadv_neigh_node *router = NULL;
|
||||
struct batadv_orig_node *orig_node_tmp;
|
||||
struct hlist_node *node;
|
||||
- uint8_t bcast_own_sum_orig, bcast_own_sum_neigh;
|
||||
+ int if_num;
|
||||
+ uint8_t sum_orig, sum_neigh;
|
||||
uint8_t *neigh_addr;
|
||||
|
||||
batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
|
||||
@@ -727,17 +728,17 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv,
|
||||
if (router && (neigh_node->tq_avg == router->tq_avg)) {
|
||||
orig_node_tmp = router->orig_node;
|
||||
spin_lock_bh(&orig_node_tmp->ogm_cnt_lock);
|
||||
- bcast_own_sum_orig =
|
||||
- orig_node_tmp->bcast_own_sum[if_incoming->if_num];
|
||||
+ if_num = router->if_incoming->if_num;
|
||||
+ sum_orig = orig_node_tmp->bcast_own_sum[if_num];
|
||||
spin_unlock_bh(&orig_node_tmp->ogm_cnt_lock);
|
||||
|
||||
orig_node_tmp = neigh_node->orig_node;
|
||||
spin_lock_bh(&orig_node_tmp->ogm_cnt_lock);
|
||||
- bcast_own_sum_neigh =
|
||||
- orig_node_tmp->bcast_own_sum[if_incoming->if_num];
|
||||
+ if_num = neigh_node->if_incoming->if_num;
|
||||
+ sum_neigh = orig_node_tmp->bcast_own_sum[if_num];
|
||||
spin_unlock_bh(&orig_node_tmp->ogm_cnt_lock);
|
||||
|
||||
- if (bcast_own_sum_orig >= bcast_own_sum_neigh)
|
||||
+ if (sum_orig >= sum_neigh)
|
||||
goto update_tt;
|
||||
}
|
||||
|
||||
--
|
||||
1.7.9.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user