aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2012-11-08 15:55:29 -0500
committerAntonio Quartulli <ordex@autistici.org>2012-11-16 03:36:43 -0500
commit1f36aebcc5fa53c5d98f3329186466b5eb76a168 (patch)
tree9edd603b2a8101c819bc6818ef322078d2b546b8 /net/batman-adv
parent27b37ebfa2d2a1b6acef6f2d21c497475c9b9709 (diff)
batman-adv: don't add TEMP clients belonging to other backbone nodes
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>
Diffstat (limited to 'net/batman-adv')
-rw-r--r--net/batman-adv/translation-table.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index fec1a00a0699..baae71585804 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,
2456{ 2456{
2457 bool ret = false; 2457 bool ret = false;
2458 2458
2459 /* if the originator is a backbone node (meaning it belongs to the same
2460 * LAN of this node) the temporary client must not be added because to
2461 * reach such destination the node must use the LAN instead of the mesh
2462 */
2463 if (batadv_bla_is_backbone_gw_orig(bat_priv, orig_node->orig))
2464 goto out;
2465
2459 if (!batadv_tt_global_add(bat_priv, orig_node, addr, 2466 if (!batadv_tt_global_add(bat_priv, orig_node, addr,
2460 BATADV_TT_CLIENT_TEMP, 2467 BATADV_TT_CLIENT_TEMP,
2461 atomic_read(&orig_node->last_ttvn))) 2468 atomic_read(&orig_node->last_ttvn)))