To those of you who actively follow the recent discussions it may come to no
big surprise that it was decided to remove the vis functionality from the
batman-adv kernel module in a not so distant future (with the next
compatibility bump). There always has been a debate whether or not such
functionality belongs into the kernel or not. The in-kernel solution bears the
disadvantage of being rather inflexible because every change has to go through
the official Linux channels. With the growing interest in flooding the network
with arbitrary data in addition to the visualization data realizing a solution
in user-space became the obvious choice.
A new, more general user-space daemon which takes over the old vis
functionality and much more, called A.L.F.R.E.D. (Almighty Lightweight Fact
Remote Exchange Daemon) came to life. Alfred is capable of distributing
information over your mesh network in a decentralized fashion, for example
graph information for vis, but also any other data which appears to be useful
- like hostnames, phone books, administration information, DNS information,
the local weather forecast, etc while requiring (almost) zero configuration.
As the development on the core functionality has been finished and alfred works
(at least on the developers boxes), we would like to call for an open beta!
There are bleeding edge downloads and an OpenWRT feed available [1]. Please
try alfred and report bugs, send patches and inform us about your experiences.
Alfred will be release along with the next batman-adv release.
Happy routing,
The B.A.T.M.A.N. team
[1] http://www.open-mesh.org/projects/open-mesh/wiki/Alfred#Download
I'm wondering if its theoretically possible to locate a device physically on the network. The nodes may have some notion of distance between eachother and therefore time, and therefore can compute the fastest route. However can any information be gleaned or added that indicates which direction a node is in relation to north south east or west on a map?
My challenge is to connect a local group of cellphones to a mesh but to also be able to define which phones are to the east of a central point which to the west, north and south.
At this point I'm not even sure if its possible.
Cheers ?
Brani mead
There is no need to hold the rtnl-lock during the preparation of the
initial OGM of a hard interface.
Besides, it is a little uggly to have batadv_schedule_bat_ogm() executed
with an rtnl-lock on its first run but without an rtnl-lock in its
rearmed versions as it makes additions to batadv_schedule_bat_ogm() that
require an rtnl-lock difficult.
Signed-off-by: Linus Lüssing <linus.luessing(a)web.de>
---
the compat code for the multicast-basic patchset needs an rtnl-lock
somewhere within batadv_schedule_bat_ogm()
hard-interface.c | 21 ++++++++++++++++++++-
types.h | 2 ++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/hard-interface.c b/hard-interface.c
index c5f871f..c7ad8ae 100644
--- a/hard-interface.c
+++ b/hard-interface.c
@@ -470,7 +470,7 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,
hard_iface->net_dev->name);
/* begin scheduling originator messages on that interface */
- batadv_schedule_bat_ogm(hard_iface);
+ queue_work(batadv_event_workqueue, &hard_iface->init_ogm_work);
out:
return 0;
@@ -554,6 +554,23 @@ static void batadv_hardif_remove_interface_finish(struct work_struct *work)
batadv_hardif_free_ref(hard_iface);
}
+/**
+ * batadv_hardif_init_ogm - initialize the ogm scheduler
+ * @work: work queue item
+ *
+ * Prepare and queue the initial OGM on this hard interface to get its ogm
+ * scheduler into gear.
+ */
+static void batadv_hardif_init_ogm(struct work_struct *work)
+{
+ struct batadv_hard_iface *hard_iface;
+
+ hard_iface = container_of(work, struct batadv_hard_iface,
+ init_ogm_work);
+
+ batadv_schedule_bat_ogm(hard_iface);
+}
+
static struct batadv_hard_iface *
batadv_hardif_add_interface(struct net_device *net_dev)
{
@@ -583,6 +600,8 @@ batadv_hardif_add_interface(struct net_device *net_dev)
INIT_LIST_HEAD(&hard_iface->list);
INIT_WORK(&hard_iface->cleanup_work,
batadv_hardif_remove_interface_finish);
+ INIT_WORK(&hard_iface->init_ogm_work,
+ batadv_hardif_init_ogm);
hard_iface->num_bcasts = BATADV_NUM_BCASTS_DEFAULT;
if (batadv_is_wifi_netdev(net_dev))
diff --git a/types.h b/types.h
index 0d5b24b..a8b5725 100644
--- a/types.h
+++ b/types.h
@@ -62,6 +62,7 @@ struct batadv_hard_iface_bat_iv {
* @rcu: struct used for freeing in an RCU-safe manner
* @bat_iv: BATMAN IV specific per hard interface data
* @cleanup_work: work queue callback item for hard interface deinit
+ * @init_ogm_work: work queue callback item for ogm scheduler initialization
*/
struct batadv_hard_iface {
struct list_head list;
@@ -76,6 +77,7 @@ struct batadv_hard_iface {
struct rcu_head rcu;
struct batadv_hard_iface_bat_iv bat_iv;
struct work_struct cleanup_work;
+ struct work_struct init_ogm_work;
};
/**
--
1.7.10.4
Tested with:
Attitude Adjustment r37270
Batman-adv 2013.2 (current stable release )
I have tested wpa* and it is currently not working with batman-adv.
The ssid for the mesh is encrypted but batman-adv/batctl is unable to
see/ping any nodes.
I tested with wpa, wpa2 and without encryption.
without encryption i was able to get the other nodes to join the mesh
and have them communicate with each other.
I believe someone has once mentioned about a patch that was related to
this problem and i wonder if it is already included in these software
releases or not and if other people are experiencing this same problem.
--
Site: http://wirelesspt.net
Mesh: http://tinyurl.com/wirelesspt
Admin: http://wirelesspt.net/wiki/Cmsv
Twitter: http://twitter.com/wirelesspt
Suporte técnico via sms: 91 19 11 798
Donativos/Paypal: http://tinyurl.com/doar-verba
Chave publica PGP/SSH: http://wirelesspt.net/arquivos/pk
Email assinado digitalmente pelo emissor assegurando autenticidade
This is the seventh revision of the basic multicast optimization patches.
It adds the style changes as suggested by Marek via eMail.
It also adds various suggestion from IRC (for instance adding kerneldoc for the
functions touched in translation-table.c, making the counter an atomic
one to be on the safe side for some "exotic" targets).
PATCHv7 4/4 is a new one and the result of a longer discussion on IRC:
Whether to add some support for some IPv4 addresses already for the cost of
a slightly larger complexity both code and documentation wise
- for a case which is uncommon for most mesh networks anyway: a mesh
with no bridges on any node involved.
So the fourth patch is sort of an RFC patch one, too (although the consense/
tendency on IRC so far was to add and support this case).
If everyone is fine with that concept, then I can also easily merge it
into patches 2/4 and 3/4 (if that is desired).
Cheers, Linus
From: Antonio Quartulli <antonio(a)open-mesh.com>
Whenever the GW client mode is deselected, a DEL event has
to be sent in order to tell userspace that the current
gateway has been lost. Send the uevent on state change only
if a gateway was currently selected.
Signed-off-by: Antonio Quartulli <antonio(a)open-mesh.com>
---
gateway_client.c | 28 ++++++++++++++++++++++++++++
gateway_client.h | 1 +
sysfs.c | 2 ++
3 files changed, 31 insertions(+)
diff --git a/gateway_client.c b/gateway_client.c
index 588d27e..bdda464 100644
--- a/gateway_client.c
+++ b/gateway_client.c
@@ -188,6 +188,34 @@ next:
return curr_gw;
}
+/**
+ * batadv_gw_check_client_stop - check if clitn mode has been switched off
+ * @bat_priv: the bat priv with all the soft interface information
+ * @new_mode: the gw mode which the node is switching to
+ *
+ * This function assumes the caller has checked that the gw state *is actually
+ * changing*. This function is not supposed to be called when there is no state
+ * change.
+ */
+void batadv_gw_check_client_stop(struct batadv_priv *bat_priv)
+{
+ struct batadv_gw_node *curr_gw;
+
+ if (atomic_read(&bat_priv->gw_mode) != BATADV_GW_MODE_CLIENT)
+ return;
+
+ curr_gw = batadv_gw_get_selected_gw_node(bat_priv);
+ if (!curr_gw)
+ return;
+
+ /* if batman-adv is switching the gw client mode off and a gateway was
+ * already selected, send a DEL uevent
+ */
+ batadv_throw_uevent(bat_priv, BATADV_UEV_GW, BATADV_UEV_DEL, NULL);
+
+ batadv_gw_node_free_ref(curr_gw);
+}
+
void batadv_gw_election(struct batadv_priv *bat_priv)
{
struct batadv_gw_node *curr_gw = NULL, *next_gw = NULL;
diff --git a/gateway_client.h b/gateway_client.h
index 7ef955a..b235cbf 100644
--- a/gateway_client.h
+++ b/gateway_client.h
@@ -20,6 +20,7 @@
#ifndef _NET_BATMAN_ADV_GATEWAY_CLIENT_H_
#define _NET_BATMAN_ADV_GATEWAY_CLIENT_H_
+void batadv_gw_check_client_stop(struct batadv_priv *bat_priv);
void batadv_gw_deselect(struct batadv_priv *bat_priv);
void batadv_gw_election(struct batadv_priv *bat_priv);
struct batadv_orig_node *
diff --git a/sysfs.c b/sysfs.c
index 6ec145d..1126f74 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -409,6 +409,8 @@ static ssize_t batadv_store_gw_mode(struct kobject *kobj,
curr_gw_mode_str, buff);
batadv_gw_deselect(bat_priv);
+ /* always call the client check before changing the state */
+ batadv_gw_check_client_stop(bat_priv);
atomic_set(&bat_priv->gw_mode, (unsigned int)gw_mode_tmp);
batadv_gw_tvlv_container_update(bat_priv);
return count;
--
1.8.1.5
From: Antonio Quartulli <antonio(a)open-mesh.com>
this comment refers to the old batmand codebase and does
not make sense anymore. Remove it
Signed-off-by: Antonio Quartulli <antonio(a)open-mesh.com>
---
gateway_client.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/gateway_client.c b/gateway_client.c
index 7116496..588d27e 100644
--- a/gateway_client.c
+++ b/gateway_client.c
@@ -194,11 +194,6 @@ void batadv_gw_election(struct batadv_priv *bat_priv)
struct batadv_neigh_node *router = NULL;
char gw_addr[18] = { '\0' };
- /* The batman daemon checks here if we already passed a full originator
- * cycle in order to make sure we don't choose the first gateway we
- * hear about. This check is based on the daemon's uptime which we
- * don't have.
- */
if (atomic_read(&bat_priv->gw_mode) != BATADV_GW_MODE_CLIENT)
goto out;
--
1.8.1.5