* [B.A.T.M.A.N.] [PATCH maint 1/2] batman-adv: don't add TEMP clients belonging to other backbone nodes
@ 2012-11-08 20:55 Antonio Quartulli
2012-11-08 20:55 ` [B.A.T.M.A.N.] [PATCH maint 2/2] batman-adv: process broadcast packets in BLA earlier Antonio Quartulli
2012-11-13 8:30 ` [B.A.T.M.A.N.] [PATCH maint 1/2] batman-adv: don't add TEMP clients belonging to other backbone nodes Marek Lindner
0 siblings, 2 replies; 4+ messages in thread
From: Antonio Quartulli @ 2012-11-08 20:55 UTC (permalink / raw)
To: b.a.t.m.a.n
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 724d05c8215e4e8186097121595ef20b6ba601b7
("batman-adv: detect not yet announced clients")
Reported-by: Glen Page <glen.page@thet.net>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
translation-table.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/translation-table.c b/translation-table.c
index fec1a00..baae715 100644
--- a/translation-table.c
+++ b/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] 4+ messages in thread
* [B.A.T.M.A.N.] [PATCH maint 2/2] batman-adv: process broadcast packets in BLA earlier
2012-11-08 20:55 [B.A.T.M.A.N.] [PATCH maint 1/2] batman-adv: don't add TEMP clients belonging to other backbone nodes Antonio Quartulli
@ 2012-11-08 20:55 ` Antonio Quartulli
2012-11-13 8:32 ` Marek Lindner
2012-11-13 8:30 ` [B.A.T.M.A.N.] [PATCH maint 1/2] batman-adv: don't add TEMP clients belonging to other backbone nodes Marek Lindner
1 sibling, 1 reply; 4+ messages in thread
From: Antonio Quartulli @ 2012-11-08 20:55 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: 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 by 724d05c8215e4e8186097121595ef20b6ba601b7
("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>
---
soft-interface.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/soft-interface.c b/soft-interface.c
index b9a28d2..ce0684a 100644
--- a/soft-interface.c
+++ b/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] 4+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH maint 1/2] batman-adv: don't add TEMP clients belonging to other backbone nodes
2012-11-08 20:55 [B.A.T.M.A.N.] [PATCH maint 1/2] batman-adv: don't add TEMP clients belonging to other backbone nodes Antonio Quartulli
2012-11-08 20:55 ` [B.A.T.M.A.N.] [PATCH maint 2/2] batman-adv: process broadcast packets in BLA earlier Antonio Quartulli
@ 2012-11-13 8:30 ` Marek Lindner
1 sibling, 0 replies; 4+ messages in thread
From: Marek Lindner @ 2012-11-13 8:30 UTC (permalink / raw)
To: b.a.t.m.a.n
On Friday, November 09, 2012 04:55:29 Antonio Quartulli wrote:
> 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 724d05c8215e4e8186097121595ef20b6ba601b7
> ("batman-adv: detect not yet announced clients")
>
> Reported-by: Glen Page <glen.page@thet.net>
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
> ---
> translation-table.c | 7 +++++++
> 1 file changed, 7 insertions(+)
Applied in revision 9b5c6ae.
Thanks,
Marek
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH maint 2/2] batman-adv: process broadcast packets in BLA earlier
2012-11-08 20:55 ` [B.A.T.M.A.N.] [PATCH maint 2/2] batman-adv: process broadcast packets in BLA earlier Antonio Quartulli
@ 2012-11-13 8:32 ` Marek Lindner
0 siblings, 0 replies; 4+ messages in thread
From: Marek Lindner @ 2012-11-13 8:32 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Simon Wunderlich
On Friday, November 09, 2012 04:55:30 Antonio Quartulli wrote:
> 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 by 724d05c8215e4e8186097121595ef20b6ba601b7
> ("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>
> ---
> soft-interface.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
Applied in revision 4dba221.
Thanks,
Marek
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-13 8:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08 20:55 [B.A.T.M.A.N.] [PATCH maint 1/2] batman-adv: don't add TEMP clients belonging to other backbone nodes Antonio Quartulli
2012-11-08 20:55 ` [B.A.T.M.A.N.] [PATCH maint 2/2] batman-adv: process broadcast packets in BLA earlier Antonio Quartulli
2012-11-13 8:32 ` Marek Lindner
2012-11-13 8:30 ` [B.A.T.M.A.N.] [PATCH maint 1/2] batman-adv: don't add TEMP clients belonging to other backbone nodes Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox