batman-adv: update package to latest release (2011.4.0)
authorMarek Lindner <lindner_marek@yahoo.de>
Mon, 14 Nov 2011 15:52:12 +0000 (15:52 +0000)
committerMarek Lindner <lindner_marek@yahoo.de>
Mon, 14 Nov 2011 15:52:12 +0000 (15:52 +0000)
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman-adv@29118 3c298f89-4303-0410-b956-a3cf2f4a3e73

Makefile
files/etc/config/batman-adv
files/lib/batman-adv/config.sh
patches/0001-batman-adv_unify_hash_entry_field_position_in_tt_local_global_entry.patch [deleted file]
patches/0002-batman-adv_add_sanity_check_when_removing_global_tts.patch [deleted file]
patches/0003-batman-adv_remove_references_for_global_tt_entries.patch [deleted file]

index 93fc391f9a551ea69fee0ff2cd9368adb6673754..5154862464573fb31467ee841cf2f8313d79a10c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,10 +10,10 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=batman-adv
 
-PKG_VERSION:=2011.3.1
-BATCTL_VERSION:=2011.3.0
-PKG_MD5SUM:=54a5caff56a8380f3070111ce84bbfc4
-BATCTL_MD5SUM:=8eb197896049bb04a6beef56015a16b6
+PKG_VERSION:=2011.4.0
+BATCTL_VERSION:=2011.4.0
+PKG_MD5SUM:=3987d693bd26d8057506b542c3635910
+BATCTL_MD5SUM:=325b25dbb8261f7fa19c6e1d9bfba6e1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
index 31ef797fbb31cd271fe36e50d9ca367d4b4a5408..414b119663dd338cc4104e62c746723d274f44cb 100644 (file)
@@ -2,6 +2,7 @@
 config 'mesh' 'bat0'
        option 'interfaces' 'mesh'
        option 'aggregated_ogms'
+       option 'ap_isolation'
        option 'bonding'
        option 'fragmentation'
        option 'gw_bandwidth'
index 347e3076f23c2c6392ba7651ec775ddf66399a69..58a01d2bc1a5da462f458cc72cc6d0a30ac02bfa 100644 (file)
@@ -13,13 +13,14 @@ is_module_loaded() {
 
 start_mesh () {
        local meshif="$1"
-       local interfaces aggregated_ogms bonding fragmentation gw_bandwidth gw_mode gw_sel_class log_level orig_interval vis_mode
+       local interfaces aggregated_ogms ap_isolation bonding fragmentation gw_bandwidth gw_mode gw_sel_class log_level orig_interval vis_mode
 
        is_module_loaded
        [ $? -ne 1 ] && return
 
        config_get interfaces "$meshif" interfaces
        config_get aggregated_ogms "$meshif" aggregated_ogms
+       config_get ap_isolation "$meshif" ap_isolation
        config_get bonding "$meshif" bonding
        config_get fragmentation "$meshif" fragmentation
        config_get gw_bandwidth "$meshif" gw_bandwidth
@@ -57,6 +58,10 @@ start_mesh () {
                echo $aggregated_ogms > /sys/class/net/$meshif/mesh/aggregated_ogms
        fi
        
+       if [ $ap_isolation ]; then
+               echo $ap_isolation > /sys/class/net/$meshif/mesh/ap_isolation
+       fi
+       
        if [ $bonding ]; then
                echo $bonding > /sys/class/net/$meshif/mesh/bonding
        fi
diff --git a/patches/0001-batman-adv_unify_hash_entry_field_position_in_tt_local_global_entry.patch b/patches/0001-batman-adv_unify_hash_entry_field_position_in_tt_local_global_entry.patch
deleted file mode 100644 (file)
index 310e281..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-
-Function tt_response_fill_table() actually uses a tt_local_entry pointer to
-iterate either over the local or the global table entries (it depends on the
-what hash table is passed as argument). To iterate over such entries the
-hlist_for_each_entry_rcu() macro has to access their "hash_entry" field which
-MUST be at the same position in both the tt_global/local_entry structures.
-
-Reported-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
-Signed-off-by: Antonio Quartulli <ordex@autistici.org>
----
- types.h |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
---- a/types.h
-+++ b/types.h
-@@ -224,22 +224,22 @@ struct socket_packet {
- struct tt_local_entry {
-       uint8_t addr[ETH_ALEN];
-+      struct hlist_node hash_entry;
-       unsigned long last_seen;
-       uint16_t flags;
-       atomic_t refcount;
-       struct rcu_head rcu;
--      struct hlist_node hash_entry;
- };
- struct tt_global_entry {
-       uint8_t addr[ETH_ALEN];
-+      struct hlist_node hash_entry; /* entry in the global table */
-       struct orig_node *orig_node;
-       uint8_t ttvn;
-       uint16_t flags; /* only TT_GLOBAL_ROAM is used */
-       unsigned long roam_at; /* time at which TT_GLOBAL_ROAM was set */
-       atomic_t refcount;
-       struct rcu_head rcu;
--      struct hlist_node hash_entry; /* entry in the global table */
- };
- struct tt_change_node {
-
diff --git a/patches/0002-batman-adv_add_sanity_check_when_removing_global_tts.patch b/patches/0002-batman-adv_add_sanity_check_when_removing_global_tts.patch
deleted file mode 100644 (file)
index 9f43083..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-After removing the batman-adv module, the hash may be already gone
-when tt_global_del_orig() tries to clean the hash. This patch adds
-a sanity check to avoid this.
-
-Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
----
- translation-table.c |    3 +++
- 1 files changed, 3 insertions(+), 0 deletions(-)
-
---- a/translation-table.c
-+++ b/translation-table.c
-@@ -712,6 +712,9 @@ void tt_global_del_orig(struct bat_priv *bat_priv,
-       struct hlist_head *head;
-       spinlock_t *list_lock; /* protects write access to the hash lists */
-+      if (!hash)
-+              return;
-+
-       for (i = 0; i < hash->size; i++) {
-               head = &hash->table[i];
-               list_lock = &hash->list_locks[i];
-
diff --git a/patches/0003-batman-adv_remove_references_for_global_tt_entries.patch b/patches/0003-batman-adv_remove_references_for_global_tt_entries.patch
deleted file mode 100644 (file)
index e155686..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-
-struct tt_global_entry holds a reference to an orig_node which must be
-decremented before deallocating the structure.
-
-Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
----
- compat.c            |    8 --------
- compat.h            |    1 -
- translation-table.c |   14 +++++++++++++-
- 3 files changed, 13 insertions(+), 10 deletions(-)
-
---- a/compat.c
-+++ b/compat.c
-@@ -36,12 +36,4 @@ void free_rcu_tt_local_entry(struct rcu_head *rcu)
-       kfree(tt_local_entry);
- }
--void free_rcu_tt_global_entry(struct rcu_head *rcu)
--{
--      struct tt_global_entry *tt_global_entry;
--
--      tt_global_entry = container_of(rcu, struct tt_global_entry, rcu);
--      kfree(tt_global_entry);
--}
--
- #endif /* < KERNEL_VERSION(3, 0, 0) */
---- a/compat.h
-+++ b/compat.h
-@@ -63,7 +63,6 @@ void free_rcu_gw_node(struct rcu_head *rcu);
- void free_rcu_neigh_node(struct rcu_head *rcu);
- void free_rcu_softif_neigh(struct rcu_head *rcu);
- void free_rcu_tt_local_entry(struct rcu_head *rcu);
--void free_rcu_tt_global_entry(struct rcu_head *rcu);
- #endif /* < KERNEL_VERSION(3, 0, 0) */
---- a/translation-table.c
-+++ b/translation-table.c
-@@ -137,10 +137,22 @@ static void tt_local_entry_free_ref(struct tt_local_entry *tt_local_entry)
-               kfree_rcu(tt_local_entry, rcu);
- }
-+static void tt_global_entry_free_rcu(struct rcu_head *rcu)
-+{
-+      struct tt_global_entry *tt_global_entry;
-+
-+      tt_global_entry = container_of(rcu, struct tt_global_entry, rcu);
-+
-+      if (tt_global_entry->orig_node)
-+              orig_node_free_ref(tt_global_entry->orig_node);
-+
-+      kfree(tt_global_entry);
-+}
-+
- static void tt_global_entry_free_ref(struct tt_global_entry *tt_global_entry)
- {
-       if (atomic_dec_and_test(&tt_global_entry->refcount))
--              kfree_rcu(tt_global_entry, rcu);
-+              call_rcu(&tt_global_entry->rcu, tt_global_entry_free_rcu);
- }
- static void tt_local_event(struct bat_priv *bat_priv, const uint8_t *addr,
-