batman-adv: ap isolation and bridge loop avoidance fixes
[feed/routing.git] / patches / 0003-batman-adv_do_not_add_TEMP_clients_belonging_to_other_backbone_nodes.patch
1 From ordex@autistici.org Fri Nov 16 16:49:17 2012
2 X-Apparently-To: lindner_marek@yahoo.de via 188.125.84.191; Fri, 16 Nov 2012 08:50:23 +0000
3 Received-SPF: pass (domain of autistici.org designates 178.255.144.35 as permitted sender)
4 X-YMailISG: 2XUGKvsWLDvGA03t6tTkIRd1IgFM3maQM0m2SA6K1X6dTDIs
5 22VSgKM.DhxAYBiW3Da9K.oH5o6C953_nJPPhur2qBPO.O3cDwjef5_Ugpc9
6 EToptn4WCMI_3P8HITy2vYKCSg9Ycsqx9qqZUyxR_6Q1muNYxPYlaakcwXc.
7 1ohYca223PQlYfbpn4rBdIT0Hf67oGZa12E_u.UgRAk80txi2mSPmlwJi1v7
8 tUv907MDZ5psHzC7gI1A8TiWoRgSe3M68t8k8V.MEHOgITRKJ2fZshNFNdca
9 lrgJos7q8MPEccQhwYN.VInpv9loDuyCJLgx.seZFqgkKyQ81g0VeT_lZMp.
10 cXmi1p0etSsdGUkOn7MFKt1dzIoq46ebW1FRMW0RBIecunHshbqZS425M5sa
11 6DJ.WZpYRxXqD2osYHboWzcz6Oi02o7r.XwFwyz55p2Hq992vZ06vJd3FQF1
12 OmHf014Ni4fKu4au2M8b_fy2bqaSMYNdYIWSPrOzRpVOvQmU6eNJZz9TTaWw
13 p.giBbKH3qDhw6sn3HtEVZwsrOjNvLiccPeRmHXXp_3cVDy9iO0a2WhEsPyG
14 HnjeV08RB4j2JuICHcFo68rbC5x6MHkKXc.f4bDQ9KqzmX_av7jotSW2jPHa
15 eqXDV0tiP1TbuZNBo9ftz367Aver9BvjM3qZOGg2VVAy2FriP4hbbLzAkK7p
16 oReYyFnOjkbHpXOFkgcMiEZyTYNoD3rsWT68YOLl74dgYraLrIY4Sv0e8bHJ
17 5u3v1aHhPNtjKNBxnd2xSSdgblb._mebG3fP1eKBGgil_efLA0cnvskj2w_z
18 BOCCHWCDYadM8RIkSB3XWkKtjkDZFwzXPEco7DuNhCKvTycFnZ_ilaJTmMSg
19 juyzcelGzKqOftqt5f1dRKUMSg2JFIv0pwZt4W.DGS4P_SqbWLEShjrxbwEc
20 b7ew9lr_iukbFzL4uN49A4uFx.J8c2WaZDv1gXvRZEiIHbdkKxlHdVyTuQ05
21 aLLDc7Mz9Y68Z7msdzKK8V5LdRqdtCzFogk9seViWAVYXdndAn7XT22cOgci
22 IhdVk8RULmZ5uouAMr0usTIH_MKtCdInt1Tn.DlGuUEeDw2M5SeSC7cKPETl
23 lnSu5f8p6_ei9sx7YwdIQDyOG2o_49xM4Oeekeh9x3dGq23BvAEa8Q--
24 X-Originating-IP: [178.255.144.35]
25 Authentication-Results: mta1054.mail.ukl.yahoo.com from=autistici.org; domainkeys=neutral (no sig); from=autistici.org; dkim=pass (ok)
26 Received: from 127.0.0.1 (EHLO contumacia.investici.org) (178.255.144.35)
27 by mta1054.mail.ukl.yahoo.com with SMTP; Fri, 16 Nov 2012 08:50:23 +0000
28 Received: from [178.255.144.35] (contumacia [178.255.144.35]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id AD953E8786;
29 Fri, 16 Nov 2012 08:50:21 +0000 (UTC)
30 X-DKIM: Sendmail DKIM Filter v2.8.2 contumacia.investici.org AD953E8786
31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org;
32 s=stigmate; t=1353055823;
33 bh=Rf2TK97MqcbN9ydt5/Ur6XKfsKU31Fnc1POW6n859o4=;
34 h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References;
35 b=rOZmgwiyXClabfKLMxvEs9cRsEGiS0CPOTPna1OmakChF1i9/CFcKollV1xOp8g/h
36 UJMy7F82OyIBYptUTcTXfvQSUD7Lh92tbrWwkAmq3/1CeqKCrcuk5DNhaQYgoKfDpT
37 qg6uTDtM5bFM21xzsl/0itBJUeRv6y+FQT4mOQeI=
38 From: Antonio Quartulli <ordex@autistici.org>
39 To: davem@davemloft.net
40 Cc: netdev@vger.kernel.org,
41 Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>,
42 Marek Lindner <lindner_marek@yahoo.de>,
43 Sven Eckelmann <sven@narfation.org>,
44 Antonio Quartulli <ordex@autistici.org>
45 Subject: [PATCH] batman-adv: don't add TEMP clients belonging to other backbone nodes
46 Date: Fri, 16 Nov 2012 09:49:17 +0100
47 Message-Id: <1353055758-2901-4-git-send-email-ordex@autistici.org>
48 X-Mailer: git-send-email 1.8.0
49 In-Reply-To: <1353055758-2901-1-git-send-email-ordex@autistici.org>
50 References: <1353055758-2901-1-git-send-email-ordex@autistici.org>
51 Status: R
52 X-Status: N
53 X-KMail-EncryptionState:
54 X-KMail-SignatureState:
55 X-KMail-MDN-Sent:
56
57 The "early client detection" mechanism must not add clients belonging
58 to other backbone nodes. Such clients must be reached by directly
59 using the LAN instead of the mesh.
60
61 This was introduced by 30cfd02b60e1cb16f5effb0a01f826c5bb7e4c59
62 ("batman-adv: detect not yet announced clients")
63
64 Reported-by: Glen Page <glen.page@thet.net>
65 Signed-off-by: Antonio Quartulli <ordex@autistici.org>
66 Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
67 ---
68 net/batman-adv/translation-table.c | 7 +++++++
69 1 file changed, 7 insertions(+)
70
71 diff --git a/translation-table.c b/translation-table.c
72 index fec1a00..baae715 100644
73 --- a/translation-table.c
74 +++ b/translation-table.c
75 @@ -2456,6 +2456,13 @@ bool batadv_tt_add_temporary_global_entry(struct batadv_priv *bat_priv,
76 {
77 bool ret = false;
78
79 + /* if the originator is a backbone node (meaning it belongs to the same
80 + * LAN of this node) the temporary client must not be added because to
81 + * reach such destination the node must use the LAN instead of the mesh
82 + */
83 + if (batadv_bla_is_backbone_gw_orig(bat_priv, orig_node->orig))
84 + goto out;
85 +
86 if (!batadv_tt_global_add(bat_priv, orig_node, addr,
87 BATADV_TT_CLIENT_TEMP,
88 atomic_read(&orig_node->last_ttvn)))
89 --
90 1.8.0
91