Hi,
I have another small but important set of changes I'd like to get pulled
into net-next-2.6/3.1. Despite our best efforts, recent tests and reviews
of the protocol changes we have introduced a couple of weeks ago made it
quite obvious that some bugs slipped through. The implementation of said
protocol does not handle all corner cases in the way it should, thus
provoking inconsistent states in the mesh. These 4 patches are meant to
address the found issues.
Thanks,
Marek
This is the third version of the AP-Isolation patchset.
The patches have been rebased on top of the master branch but they have been
left mostly unmodified.
The Ap-isolation mechanism will prevent (if enabled) WIFI clients to communicate
with other WIFI clients over the mesh network. WIFI check on a client is done
by default while the isolation is performed only if the mechanism is enabled
either on the receiver and on the transmitter side.
Ap-isolation can be enabled or disabled by means of a new sysfs attribute (a
batctl patch has also been provided to toggle interact with it).
Thank you all.
Regards,
Antonio Quartulli
In case of tt_crc mismatching for a certain orig_node after applying the
changes, the node must request the full table immediately.
Signed-off-by: Antonio Quartulli <ordex(a)autistici.org>
---
routing.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/routing.c b/routing.c
index 2cb98be..010ebb7 100644
--- a/routing.c
+++ b/routing.c
@@ -91,6 +91,11 @@ static void update_transtable(struct bat_priv *bat_priv,
* to recompute it to spot any possible inconsistency
* in the global table */
orig_node->tt_crc = tt_global_crc(bat_priv, orig_node);
+
+ /* If something went wrong we must request the full table now */
+ if (orig_node->tt_crc != tt_crc)
+ goto request_table;
+
/* Roaming phase is over: tables are in sync again. I can
* unset the flag */
orig_node->tt_poss_change = false;
--
1.7.3.4
Hello all,
this is the second version of the TT consistency fix patchset.
The beautification patches have been removed as they were probably introducing
a few new problems (thanks Sven for pointing me to the C99 documentation) while
the remaining 4 patches have been merged in a more logical way.
Here is a little overview:
- 1/3 solves a 'little' bug found today.
- 2/3 fixes the way local tables are handled
- 3/3 fixes the roaming phase in order to keep consistency
For more details, please read the commit messages.
Thansk you!
Regards,
Antonio Quartulli
Hello everybody.
In the current TT implementation there are some cases where transtable
consistency is not kept.
In particular, it is possible to observe this problem in case of a tt_response
issued after a request for full-table: if the responding node is _the real
destination of the request_ then it will send within the response message also
those clients added after the last ttvn increment.
This will cause an inconsistency because now we have different nodes with
the same ttvn value but with different tables for the same originator.
These patches are meant to solve this issue and keep consistency among nodes.
Patches 1) and 2) introduce beautifications only. This change helped in writing
patches 5) and 6) by reducing the code complexity.
I would like to read some feedbacks even about the patch decomposition, which
could probably be improved :-)
Thank you all.
Regards,
Antonio Quartulli
Hi all,
I have three nodes (connected through wifi) running batman-adv,
node_1 ------ node_2 ------node_3
They have ip address ipv4 10.42.43.1 , 2 , 3 respectively.
Now, all the nodes are connected to each other.
To see the bandwidth and jitter patterns through relaying, I decided
to disconnect node_1 and node_3.
In node_1 ,
sudo iptables -A INPUT -s 10.42.43.3 -j DROP
When, I now run batman-adv protocol, node_1 still finds node_3 without
node_2 being involved.
Though they cannot ping and avahi doesn't run, batman-adv shows them
as 1 hop neighbors.
How can I disconnect node_1 from node_3 so that I can see the 2 hop patterns.
Thankyou in advance.
Max
Hi all,
I downloaded the batctl package 2011.1.0 from the batman website. I
installed it using command make all.
It generates the following two warnings:
functions.c: In function ‘read_file’:
functions.c:153:9: warning: ignoring return value of ‘system’,
declared with attribute warn_unused_result
and
bisect.c: In function ‘bisect’:
bisect.c:197:9: warning: ‘j’ may be used uninitialized in this function
I just ignored the warnings. But, I wasn't able to run the batctl
command neither could I see the manual page for batctl.
I couldn't figure out what exactly could be the issue though I have
been going through the codes and the makefile.
Do anyone of you have an idea if my way of installation is correct?
Thanking you.
Max
Hi,
I'd like to get the following patches pulled into net-next-2.6/3.1.
This patchset contains a mix of cleanup code (patch 1-3) for the protocol
changes we sent you with our last pull request, 2 bug fixes and an
improved version handling patch.
Thanks,
Marek
PS: This is my first pull request - have mercy on my soul and let me know
if does not meet your expectations.
The following changes since commit 43676ab590c3f8686fd047d34c3e33803eef71f0:
batman-adv: improved gateway tq-based selection (2011-06-20 11:37:41 +0200)
are available in the git repository at:
git://git.open-mesh.org/linux-merge.git batman-adv/next
Antonio Quartulli (3):
batman-adv: unify flags for tt_change/tt_local_entry/tt_global_entry
batman-adv: add_bcast_packet_to_list() takes the sending delay as parameter
batman-adv: pass a unique flag arg instead of a sequence of bool ones
Marek Lindner (2):
batman-adv: broadcast primary OGM on all active hard-interfaces
batman-adv: aggregation checks should use the primary_if pointer
Sven Eckelmann (1):
batman-adv: Replace version info instead of appending them
net/batman-adv/aggregation.c | 25 ++++++++++++++++++++-----
net/batman-adv/gateway_client.c | 5 ++---
net/batman-adv/main.c | 9 ++-------
net/batman-adv/main.h | 11 +++--------
net/batman-adv/originator.c | 5 ++---
net/batman-adv/packet.h | 11 +++++++----
net/batman-adv/routing.c | 2 +-
net/batman-adv/send.c | 21 +++++++++++++++------
net/batman-adv/send.h | 2 +-
net/batman-adv/soft-interface.c | 2 +-
net/batman-adv/translation-table.c | 30 ++++++++++++++----------------
net/batman-adv/translation-table.h | 3 +--
net/batman-adv/types.h | 4 ++--
13 files changed, 71 insertions(+), 59 deletions(-)
The packet aggregation needs to ensure that only compatible packets
are aggregated. Some of the checks are based on the interface number
while assuming that the first interface also is the primary interface
which is not always the case.
This patch addresses the issue by using the primary_if pointer.
Reported-by: Antonio Quartulli <ordex(a)autistici.org>
Signed-off-by: Marek Lindner <lindner_marek(a)yahoo.de>
---
aggregation.c | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/aggregation.c b/aggregation.c
index c583e04..69467fe 100644
--- a/aggregation.c
+++ b/aggregation.c
@@ -28,6 +28,7 @@
/* return true if new_packet can be aggregated with forw_packet */
static bool can_aggregate_with(const struct batman_packet *new_batman_packet,
+ struct bat_priv *bat_priv,
int packet_len,
unsigned long send_time,
bool directlink,
@@ -37,6 +38,8 @@ static bool can_aggregate_with(const struct batman_packet *new_batman_packet,
struct batman_packet *batman_packet =
(struct batman_packet *)forw_packet->skb->data;
int aggregated_bytes = forw_packet->packet_len + packet_len;
+ struct hard_iface *primary_if = NULL;
+ bool res = false;
/**
* we can aggregate the current packet to this aggregated packet
@@ -61,6 +64,10 @@ static bool can_aggregate_with(const struct batman_packet *new_batman_packet,
* packet
*/
+ primary_if = primary_if_get_selected(bat_priv);
+ if (!primary_if)
+ goto out;
+
/* packets without direct link flag and high TTL
* are flooded through the net */
if ((!directlink) &&
@@ -70,8 +77,10 @@ static bool can_aggregate_with(const struct batman_packet *new_batman_packet,
/* own packets originating non-primary
* interfaces leave only that interface */
((!forw_packet->own) ||
- (forw_packet->if_incoming->if_num == 0)))
- return true;
+ (forw_packet->if_incoming == primary_if))) {
+ res = true;
+ goto out;
+ }
/* if the incoming packet is sent via this one
* interface only - we still can aggregate */
@@ -84,11 +93,16 @@ static bool can_aggregate_with(const struct batman_packet *new_batman_packet,
* (= secondary interface packets in general) */
(batman_packet->flags & DIRECTLINK ||
(forw_packet->own &&
- forw_packet->if_incoming->if_num != 0)))
- return true;
+ forw_packet->if_incoming != primary_if))) {
+ res = true;
+ goto out;
+ }
}
- return false;
+out:
+ if (primary_if)
+ hardif_free_ref(primary_if);
+ return res;
}
/* create a new aggregated packet and add this packet to it */
@@ -210,6 +224,7 @@ void add_bat_packet_to_list(struct bat_priv *bat_priv,
hlist_for_each_entry(forw_packet_pos, tmp_node,
&bat_priv->forw_bat_list, list) {
if (can_aggregate_with(batman_packet,
+ bat_priv,
packet_len,
send_time,
direct_link,
--
1.7.5.3