* [PATCH 1/4] batman-adv: fix tt_global_entries flags update
2012-11-16 8:49 pull request: batman-adv 2012-11-16 Antonio Quartulli
@ 2012-11-16 8:49 ` Antonio Quartulli
2012-11-16 8:49 ` [PATCH 2/4] batman-adv: correctly pass the client flag on tt_response Antonio Quartulli
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Antonio Quartulli @ 2012-11-16 8:49 UTC (permalink / raw)
To: davem
Cc: netdev, Simon Wunderlich, Marek Lindner, Sven Eckelmann,
Antonio Quartulli
Flags carried by a change_entry have to be always copied into the
client entry as they may contain important attributes (e.g.
TT_CLIENT_WIFI).
For instance, a client added by means of the "early detection
mechanism" has no flag set at the beginning, so they must be updated once the
proper ADD event is received.
This was introduced by 30cfd02b60e1cb16f5effb0a01f826c5bb7e4c59
("batman-adv: detect not yet announced clients")
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
---
net/batman-adv/translation-table.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index 112edd3..64c0012 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -769,6 +769,12 @@ int batadv_tt_global_add(struct batadv_priv *bat_priv,
*/
tt_global_entry->common.flags &= ~BATADV_TT_CLIENT_TEMP;
+ /* the change can carry possible "attribute" flags like the
+ * TT_CLIENT_WIFI, therefore they have to be copied in the
+ * client entry
+ */
+ tt_global_entry->common.flags |= flags;
+
/* If there is the BATADV_TT_CLIENT_ROAM flag set, there is only
* one originator left in the list and we previously received a
* delete + roaming change for this originator.
--
1.8.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/4] batman-adv: correctly pass the client flag on tt_response
2012-11-16 8:49 pull request: batman-adv 2012-11-16 Antonio Quartulli
2012-11-16 8:49 ` [PATCH 1/4] batman-adv: fix tt_global_entries flags update Antonio Quartulli
@ 2012-11-16 8:49 ` Antonio Quartulli
2012-11-16 8:49 ` [PATCH 3/4] batman-adv: don't add TEMP clients belonging to other backbone nodes Antonio Quartulli
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Antonio Quartulli @ 2012-11-16 8:49 UTC (permalink / raw)
To: davem
Cc: netdev, Simon Wunderlich, Marek Lindner, Sven Eckelmann,
Antonio Quartulli
When a TT response with the full table is sent, the client flags
should be sent as well. This patch fix the flags assignment when
populating the tt_response to send back
This was introduced by 30cfd02b60e1cb16f5effb0a01f826c5bb7e4c59
("batman-adv: detect not yet announced clients")
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
---
net/batman-adv/translation-table.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index 64c0012..fec1a00 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -1502,7 +1502,7 @@ batadv_tt_response_fill_table(uint16_t tt_len, uint8_t ttvn,
memcpy(tt_change->addr, tt_common_entry->addr,
ETH_ALEN);
- tt_change->flags = BATADV_NO_FLAGS;
+ tt_change->flags = tt_common_entry->flags;
tt_count++;
tt_change++;
--
1.8.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/4] batman-adv: don't add TEMP clients belonging to other backbone nodes
2012-11-16 8:49 pull request: batman-adv 2012-11-16 Antonio Quartulli
2012-11-16 8:49 ` [PATCH 1/4] batman-adv: fix tt_global_entries flags update Antonio Quartulli
2012-11-16 8:49 ` [PATCH 2/4] batman-adv: correctly pass the client flag on tt_response Antonio Quartulli
@ 2012-11-16 8:49 ` Antonio Quartulli
2012-11-16 8:49 ` [PATCH 4/4] batman-adv: process broadcast packets in BLA earlier Antonio Quartulli
2012-11-16 18:39 ` pull request: batman-adv 2012-11-16 David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Antonio Quartulli @ 2012-11-16 8:49 UTC (permalink / raw)
To: davem
Cc: netdev, Simon Wunderlich, Marek Lindner, Sven Eckelmann,
Antonio Quartulli
The "early client detection" mechanism must not add clients belonging
to other backbone nodes. Such clients must be reached by directly
using the LAN instead of the mesh.
This was introduced by 30cfd02b60e1cb16f5effb0a01f826c5bb7e4c59
("batman-adv: detect not yet announced clients")
Reported-by: Glen Page <glen.page@thet.net>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
---
net/batman-adv/translation-table.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index fec1a00..baae715 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -2456,6 +2456,13 @@ bool batadv_tt_add_temporary_global_entry(struct batadv_priv *bat_priv,
{
bool ret = false;
+ /* if the originator is a backbone node (meaning it belongs to the same
+ * LAN of this node) the temporary client must not be added because to
+ * reach such destination the node must use the LAN instead of the mesh
+ */
+ if (batadv_bla_is_backbone_gw_orig(bat_priv, orig_node->orig))
+ goto out;
+
if (!batadv_tt_global_add(bat_priv, orig_node, addr,
BATADV_TT_CLIENT_TEMP,
atomic_read(&orig_node->last_ttvn)))
--
1.8.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 4/4] batman-adv: process broadcast packets in BLA earlier
2012-11-16 8:49 pull request: batman-adv 2012-11-16 Antonio Quartulli
` (2 preceding siblings ...)
2012-11-16 8:49 ` [PATCH 3/4] batman-adv: don't add TEMP clients belonging to other backbone nodes Antonio Quartulli
@ 2012-11-16 8:49 ` Antonio Quartulli
2012-11-16 18:39 ` pull request: batman-adv 2012-11-16 David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Antonio Quartulli @ 2012-11-16 8:49 UTC (permalink / raw)
To: davem
Cc: netdev, Simon Wunderlich, Marek Lindner, Sven Eckelmann,
Antonio Quartulli, Simon Wunderlich
The logic in the BLA mechanism may decide to drop broadcast packets
because the node may still be in the setup phase. For this reason,
further broadcast processing like the early client detection mechanism
must be done only after the BLA check.
This patches moves the invocation to BLA before any other broadcast
processing.
This was introduced 30cfd02b60e1cb16f5effb0a01f826c5bb7e4c59
("batman-adv: detect not yet announced clients")
Reported-by: Glen Page <glen.page@thet.net>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
---
net/batman-adv/soft-interface.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index b9a28d2..ce0684a 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -325,6 +325,12 @@ void batadv_interface_rx(struct net_device *soft_iface,
soft_iface->last_rx = jiffies;
+ /* Let the bridge loop avoidance check the packet. If will
+ * not handle it, we can safely push it up.
+ */
+ if (batadv_bla_rx(bat_priv, skb, vid, is_bcast))
+ goto out;
+
if (orig_node)
batadv_tt_add_temporary_global_entry(bat_priv, orig_node,
ethhdr->h_source);
@@ -332,12 +338,6 @@ void batadv_interface_rx(struct net_device *soft_iface,
if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest))
goto dropped;
- /* Let the bridge loop avoidance check the packet. If will
- * not handle it, we can safely push it up.
- */
- if (batadv_bla_rx(bat_priv, skb, vid, is_bcast))
- goto out;
-
netif_rx(skb);
goto out;
--
1.8.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: pull request: batman-adv 2012-11-16
2012-11-16 8:49 pull request: batman-adv 2012-11-16 Antonio Quartulli
` (3 preceding siblings ...)
2012-11-16 8:49 ` [PATCH 4/4] batman-adv: process broadcast packets in BLA earlier Antonio Quartulli
@ 2012-11-16 18:39 ` David Miller
4 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2012-11-16 18:39 UTC (permalink / raw)
To: ordex; +Cc: netdev, simon.wunderlich, lindner_marek, sven
From: Antonio Quartulli <ordex@autistici.org>
Date: Fri, 16 Nov 2012 09:49:14 +0100
> here is small set of fixes intended for net/linux-3.7.
> These patches are fixing some interoperability problems due to the features we
> added in 3.7. Mainly we have two big issues: one is preventing clients connected
> to the mesh network to contact any other hosts, caused by a not proper
> translation table handling; the second one compromises the AP isolation feature
> causing it to be completely useless, no matter it was on or off.
Pulled, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread