From: Marek Lindner Date: Sat, 17 Nov 2012 06:08:38 +0000 (+0000) Subject: batman-adv: ap isolation and bridge loop avoidance fixes X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;hb=d48e9fdf46bcedc78d54987df53216954b6ab955 batman-adv: ap isolation and bridge loop avoidance fixes Signed-off-by: Marek Lindner SVN-Revision: 34221 --- diff --git a/net/batman-adv/Makefile b/net/batman-adv/Makefile index 18f4fff7ba..f782ab7a51 100644 --- a/net/batman-adv/Makefile +++ b/net/batman-adv/Makefile @@ -12,7 +12,7 @@ PKG_NAME:=batman-adv PKG_VERSION:=2012.4.0 BATCTL_VERSION:=2012.4.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MD5SUM:=24e922a64a507b146c32c585538407f2 BATCTL_MD5SUM:=79d5aa796ae8b008a9fa42c27d4da2c1 diff --git a/net/batman-adv/patches/0001-batman-adv_fix_tt_global_entries_flags_update.patch b/net/batman-adv/patches/0001-batman-adv_fix_tt_global_entries_flags_update.patch new file mode 100644 index 0000000000..d298dce04f --- /dev/null +++ b/net/batman-adv/patches/0001-batman-adv_fix_tt_global_entries_flags_update.patch @@ -0,0 +1,91 @@ +From ordex@autistici.org Fri Nov 16 16:49:15 2012 +X-Apparently-To: lindner_marek@yahoo.de via 188.125.84.188; Fri, 16 Nov 2012 08:50:20 +0000 +Received-SPF: pass (domain of autistici.org designates 178.255.144.35 as permitted sender) +X-YMailISG: LjItQMwWLDsFo9iIj9SpdJB2BfvjP1gD3E_NVQ_UwftNCcRw + mktGb.BmfJsKNd8xzk6l6Af7UUv1xLGNNu25H2xh2Qb5gkNtOz8STnhREHXW + 2wrVlJrV4N5P1GjUMi.mg0HiNw_iW.wstmwKVt21QjNLaCOFSu8oPvFbkYfI + a1bHeL4AaHEU0DrQEdLR8RQ74pEv8hqcWNNMJfG53AiFszd5zBkge1YX_Ce. + tM6HQM.mvYm3leQRAbo9ITvWqlIaaGjSWIinrbKMiIF_MeHSsGZV2vKBn7n6 + q6Afw5YPoHlvIKMLhPDHkCilJ6kL0s7d4pgxe.s9qywWqJjlQUiik_1epdgG + 7EWPJXpL7s_R.rfVjXwyIP.m45MUYOO9yqC_CRpSFikVk4kKhPpALa0dUZOb + ts_1EEStTcoclQAhj2gkxMrTwwGrV4L.thb3f8pRxEzNf._haOS7.I8EXd6a + UEqTCSWEFifITimxDl5iXOn1nov6gi5BthoGXOdf1.3ljQcyrzZnMWsplq5D + u7B_Gjk8YHeWeZma9AhXuCcvmlOBKwNRaGwNy7wI7Bx8KMei7B9cr2jryis3 + jnOGkxmyerkvMvP1e8HQrMC.ge0q718RWZJB_U5JsyNqcCEr7W4qyOggbpcw + E5igrmVqqs2YbDi5LC7.8vOqlVNKrOvfZpGK4BYDU8eVxCNv2yd40Chd2a94 + xUqzzSCq_SDsEvheC1lxOWIEFh3OXjYjp3bx3Eugx1.9gWDOX2k5BLpKkg.A + IM9CcDNqLPdfsQcPCoapHq6vOumxN9pZ8JxiNKRbDmy25ilJlOARJ9rcYTvA + lYH.22GFKzx3ggAuW89UVsw0agTkF55kT.9_84nTSfmle5cUwO5t4lEFXhq9 + V5hy3rjYs8FShSBR6UC5rav23vPHsQESjqLCE0Q4H4HYA._lGDd4qAErDqwe + lToZWLoLTW7telXC2LTnC3JeG8J7L4wJGo9PbfbPx6En.bj6GgfY5qObT0bk + q.5ZOl_vfdcdnjw5sVpMuxpIzRyASOM4Dp40Kd5VF6zajUeGuRA8bXs34Ag- +X-Originating-IP: [178.255.144.35] +Authentication-Results: mta1083.mail.ukl.yahoo.com from=autistici.org; domainkeys=neutral (no sig); from=autistici.org; dkim=pass (ok) +Received: from 127.0.0.1 (EHLO contumacia.investici.org) (178.255.144.35) + by mta1083.mail.ukl.yahoo.com with SMTP; Fri, 16 Nov 2012 08:50:19 +0000 +Received: from [178.255.144.35] (contumacia [178.255.144.35]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id 00F60E8714; + Fri, 16 Nov 2012 08:50:17 +0000 (UTC) +X-DKIM: Sendmail DKIM Filter v2.8.2 contumacia.investici.org 00F60E8714 +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; + s=stigmate; t=1353055819; + bh=XsI1HH9Qj6JfIxg3GZGAztofUiRgq5pmBZUCGlj/oKs=; + h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; + b=ahp9/Hf4dpprZKMhl2rN3hK5FGhM61FzXZgxzMdz0KqKTvJfjcaS0Ii0a8pAVFilq + TfTcqXNuPDbRE/i6wdU6+QEY1/fkRK7Ij2rWdQECxEVe5pItj8vMCvXH+GYlhjQkcs + ys7ZMqyXXzs9dUqZRenQXLJLuTkcSwuPP7bmGsg0= +From: Antonio Quartulli +To: davem@davemloft.net +Cc: netdev@vger.kernel.org, + Simon Wunderlich , + Marek Lindner , + Sven Eckelmann , + Antonio Quartulli +Subject: [PATCH] batman-adv: fix tt_global_entries flags update +Date: Fri, 16 Nov 2012 09:49:15 +0100 +Message-Id: <1353055758-2901-2-git-send-email-ordex@autistici.org> +X-Mailer: git-send-email 1.8.0 +In-Reply-To: <1353055758-2901-1-git-send-email-ordex@autistici.org> +References: <1353055758-2901-1-git-send-email-ordex@autistici.org> +Status: R +X-Status: N +X-KMail-EncryptionState: +X-KMail-SignatureState: +X-KMail-MDN-Sent: + +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 +Signed-off-by: Marek Lindner +--- + translation-table.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/translation-table.c b/translation-table.c +index 112edd3..64c0012 100644 +--- a/translation-table.c ++++ b/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 + diff --git a/net/batman-adv/patches/0002-batman-adv_correctly_pass_the_client_flag_on_tt_response.patch b/net/batman-adv/patches/0002-batman-adv_correctly_pass_the_client_flag_on_tt_response.patch new file mode 100644 index 0000000000..ceccae6970 --- /dev/null +++ b/net/batman-adv/patches/0002-batman-adv_correctly_pass_the_client_flag_on_tt_response.patch @@ -0,0 +1,85 @@ +From ordex@autistici.org Fri Nov 16 16:49:16 2012 +X-Apparently-To: lindner_marek@yahoo.de via 188.125.84.191; Fri, 16 Nov 2012 08:50:21 +0000 +Received-SPF: pass (domain of autistici.org designates 178.255.144.35 as permitted sender) +X-YMailISG: fVfMssIWLDsEjVl9FTNnqLYIz03Fp5zMnBfNrwq01TpmFHMe + 4NioQil50ZX.KNrDwxWrNL7F5LVE3iFuNBiOj4vXGfU9GDPuCH8xLBGseyad + EatFIUDFeUMbfEwZPy28z_9EXlsHz5RAaq3WJlVwxlbl8HYO8KDoP.O2uPJB + f1LCApHhOzbwEorY6aey0roQgYwXheDamyypNW23KoTrKRRt2yIX_44YOEX6 + yPbmxmK2m2L048nZkBe5u1LD89PXTn2P07.Km_O95JLxjx1PCFbKa3TBNIk5 + n367Buu6KbhXuIU39l_ilvI6UWIwyDT9gyhYrjDgPn8680zLGVtcXjUO9DLw + lHybXd6kneRWA7krXtrHIxRPJrayaHbsMEztJWBGUMrwglJlJThMRvp8nhgV + nw0fVqbQI7sUiFMZx9QVMETsQ2krXG7GUVNFuELV_ej3IP_vjYBZtLBB8Aqb + Wh9yk0UByNlHv82yvc_N3B67fzOEcJkC6fsFuvC7oBsjFBU.j6ejX_BrPiyi + M7uelmPRLdOujZpZ.7K3Az1nCgdyOcWuf.F37.409a2DQJDh8EuptbFF0gJR + p4nscDuQUch1VOaYVXUzgIFpmVNQbbvV63t2PegzhrYV1xmv8TXv4DPDDmKw + 7zEqGuOok9HayiISSYrlxLiw4a2OQoaNhGPtoFzxVdWJxReku9T6yB8tedcW + ilpf3_Rf1MDCB2W1HxRspPq6RcSu2WleYAINgzrlU6Gsgks2zExjTuYVaIv0 + 9ydk8.K77fsbS11Nmj6cynKgooOZiHpao2I6ggYO5tTM4_R4slHPVZlg8hGB + feKVfKaeYKPYQ3chD99PuxjXoEup9Cn3rmRcWNDMd72ncd1Xk43HHkDyTmSI + 6OXRkTWMEkEhqA6MT7CVOuWnzRaT6AxKBybOso7XWRaiIxi1AOpEy7ihWLNW + pcQkRakzv2wqpknWLMlgHzLZs3LEPSpcCQwHBbVMkLL6S8m_moDLO4fdzz0v + i40nJUsBpxOAl49u3ZTM0G2ccDz5IJVOTuyqbGtZdeG5MBen9DJh4NCYP_No + psAEk9j1XV_1aaAakSNFXnS18XtYBtZaewE.O5KTHddFyFSBWF2VwR2dFEIf + NV9kSDSl6Gm4P2PjYWOdeXf0YiRm6cba_Q-- +X-Originating-IP: [178.255.144.35] +Authentication-Results: mta1027.mail.ukl.yahoo.com from=autistici.org; domainkeys=neutral (no sig); from=autistici.org; dkim=pass (ok) +Received: from 127.0.0.1 (EHLO contumacia.investici.org) (178.255.144.35) + by mta1027.mail.ukl.yahoo.com with SMTP; Fri, 16 Nov 2012 08:50:21 +0000 +Received: from [178.255.144.35] (contumacia [178.255.144.35]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id CEF29E8797; + Fri, 16 Nov 2012 08:50:19 +0000 (UTC) +X-DKIM: Sendmail DKIM Filter v2.8.2 contumacia.investici.org CEF29E8797 +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; + s=stigmate; t=1353055821; + bh=Z+GuGLsx9ZvEgtokRJqUrcaZ46uGZCSjpzl9VagyFsY=; + h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; + b=daWWrrrXRKMymNqgCbTU4Z67tlYH+UtOkzrTMpikDtsSVqGhdWuKPG/mY2+eaO+ra + ap5dS/KrwlFmxni3y16IuXKcPQo8EIANkE0mWSXZgOOqh9ps3VrYZBlWoThf8w/NYw + Mw3Bi7uuS75kwEq5akDKroDq8jufp9RVZ+ZVW3oY= +From: Antonio Quartulli +To: davem@davemloft.net +Cc: netdev@vger.kernel.org, + Simon Wunderlich , + Marek Lindner , + Sven Eckelmann , + Antonio Quartulli +Subject: [PATCH] batman-adv: correctly pass the client flag on tt_response +Date: Fri, 16 Nov 2012 09:49:16 +0100 +Message-Id: <1353055758-2901-3-git-send-email-ordex@autistici.org> +X-Mailer: git-send-email 1.8.0 +In-Reply-To: <1353055758-2901-1-git-send-email-ordex@autistici.org> +References: <1353055758-2901-1-git-send-email-ordex@autistici.org> +Status: R +X-Status: N +X-KMail-EncryptionState: +X-KMail-SignatureState: +X-KMail-MDN-Sent: + +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 +Signed-off-by: Marek Lindner +--- + translation-table.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/translation-table.c b/translation-table.c +index 64c0012..fec1a00 100644 +--- a/translation-table.c ++++ b/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 + diff --git a/net/batman-adv/patches/0003-batman-adv_do_not_add_TEMP_clients_belonging_to_other_backbone_nodes.patch b/net/batman-adv/patches/0003-batman-adv_do_not_add_TEMP_clients_belonging_to_other_backbone_nodes.patch new file mode 100644 index 0000000000..e4f1f87257 --- /dev/null +++ b/net/batman-adv/patches/0003-batman-adv_do_not_add_TEMP_clients_belonging_to_other_backbone_nodes.patch @@ -0,0 +1,91 @@ +From ordex@autistici.org Fri Nov 16 16:49:17 2012 +X-Apparently-To: lindner_marek@yahoo.de via 188.125.84.191; Fri, 16 Nov 2012 08:50:23 +0000 +Received-SPF: pass (domain of autistici.org designates 178.255.144.35 as permitted sender) +X-YMailISG: 2XUGKvsWLDvGA03t6tTkIRd1IgFM3maQM0m2SA6K1X6dTDIs + 22VSgKM.DhxAYBiW3Da9K.oH5o6C953_nJPPhur2qBPO.O3cDwjef5_Ugpc9 + EToptn4WCMI_3P8HITy2vYKCSg9Ycsqx9qqZUyxR_6Q1muNYxPYlaakcwXc. + 1ohYca223PQlYfbpn4rBdIT0Hf67oGZa12E_u.UgRAk80txi2mSPmlwJi1v7 + tUv907MDZ5psHzC7gI1A8TiWoRgSe3M68t8k8V.MEHOgITRKJ2fZshNFNdca + lrgJos7q8MPEccQhwYN.VInpv9loDuyCJLgx.seZFqgkKyQ81g0VeT_lZMp. + cXmi1p0etSsdGUkOn7MFKt1dzIoq46ebW1FRMW0RBIecunHshbqZS425M5sa + 6DJ.WZpYRxXqD2osYHboWzcz6Oi02o7r.XwFwyz55p2Hq992vZ06vJd3FQF1 + OmHf014Ni4fKu4au2M8b_fy2bqaSMYNdYIWSPrOzRpVOvQmU6eNJZz9TTaWw + p.giBbKH3qDhw6sn3HtEVZwsrOjNvLiccPeRmHXXp_3cVDy9iO0a2WhEsPyG + HnjeV08RB4j2JuICHcFo68rbC5x6MHkKXc.f4bDQ9KqzmX_av7jotSW2jPHa + eqXDV0tiP1TbuZNBo9ftz367Aver9BvjM3qZOGg2VVAy2FriP4hbbLzAkK7p + oReYyFnOjkbHpXOFkgcMiEZyTYNoD3rsWT68YOLl74dgYraLrIY4Sv0e8bHJ + 5u3v1aHhPNtjKNBxnd2xSSdgblb._mebG3fP1eKBGgil_efLA0cnvskj2w_z + BOCCHWCDYadM8RIkSB3XWkKtjkDZFwzXPEco7DuNhCKvTycFnZ_ilaJTmMSg + juyzcelGzKqOftqt5f1dRKUMSg2JFIv0pwZt4W.DGS4P_SqbWLEShjrxbwEc + b7ew9lr_iukbFzL4uN49A4uFx.J8c2WaZDv1gXvRZEiIHbdkKxlHdVyTuQ05 + aLLDc7Mz9Y68Z7msdzKK8V5LdRqdtCzFogk9seViWAVYXdndAn7XT22cOgci + IhdVk8RULmZ5uouAMr0usTIH_MKtCdInt1Tn.DlGuUEeDw2M5SeSC7cKPETl + lnSu5f8p6_ei9sx7YwdIQDyOG2o_49xM4Oeekeh9x3dGq23BvAEa8Q-- +X-Originating-IP: [178.255.144.35] +Authentication-Results: mta1054.mail.ukl.yahoo.com from=autistici.org; domainkeys=neutral (no sig); from=autistici.org; dkim=pass (ok) +Received: from 127.0.0.1 (EHLO contumacia.investici.org) (178.255.144.35) + by mta1054.mail.ukl.yahoo.com with SMTP; Fri, 16 Nov 2012 08:50:23 +0000 +Received: from [178.255.144.35] (contumacia [178.255.144.35]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id AD953E8786; + Fri, 16 Nov 2012 08:50:21 +0000 (UTC) +X-DKIM: Sendmail DKIM Filter v2.8.2 contumacia.investici.org AD953E8786 +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; + s=stigmate; t=1353055823; + bh=Rf2TK97MqcbN9ydt5/Ur6XKfsKU31Fnc1POW6n859o4=; + h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; + b=rOZmgwiyXClabfKLMxvEs9cRsEGiS0CPOTPna1OmakChF1i9/CFcKollV1xOp8g/h + UJMy7F82OyIBYptUTcTXfvQSUD7Lh92tbrWwkAmq3/1CeqKCrcuk5DNhaQYgoKfDpT + qg6uTDtM5bFM21xzsl/0itBJUeRv6y+FQT4mOQeI= +From: Antonio Quartulli +To: davem@davemloft.net +Cc: netdev@vger.kernel.org, + Simon Wunderlich , + Marek Lindner , + Sven Eckelmann , + Antonio Quartulli +Subject: [PATCH] batman-adv: don't add TEMP clients belonging to other backbone nodes +Date: Fri, 16 Nov 2012 09:49:17 +0100 +Message-Id: <1353055758-2901-4-git-send-email-ordex@autistici.org> +X-Mailer: git-send-email 1.8.0 +In-Reply-To: <1353055758-2901-1-git-send-email-ordex@autistici.org> +References: <1353055758-2901-1-git-send-email-ordex@autistici.org> +Status: R +X-Status: N +X-KMail-EncryptionState: +X-KMail-SignatureState: +X-KMail-MDN-Sent: + +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 +Signed-off-by: Antonio Quartulli +Signed-off-by: Marek Lindner +--- + net/batman-adv/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 + diff --git a/net/batman-adv/patches/0004-batman-adv_process_broadcast_packets_in_BLA_earlier.patch b/net/batman-adv/patches/0004-batman-adv_process_broadcast_packets_in_BLA_earlier.patch new file mode 100644 index 0000000000..e444bc48fb --- /dev/null +++ b/net/batman-adv/patches/0004-batman-adv_process_broadcast_packets_in_BLA_earlier.patch @@ -0,0 +1,110 @@ +From ordex@autistici.org Fri Nov 16 16:49:18 2012 +X-Apparently-To: lindner_marek@yahoo.de via 188.125.84.189; Fri, 16 Nov 2012 08:50:26 +0000 +Received-SPF: pass (domain of autistici.org designates 178.255.144.35 as permitted sender) +X-YMailISG: qdh1iTQWLDs62bkFFSythfvhHaZxhfpJ5PSKnjpe7hExOA6w + 0Hc3JpktYyerT5XQmK0XpfEp9b0El16poZFQ_PqNppiGeXVbVwgYE8uvjLm1 + kNwrYEvCc0nHo78mCSQkk_ilI7QHsL0vneWF0aISE9yqNNXjqyQkimfmRRfQ + U7DiQvok4JxuXMCS9G86op0LQLt0H9_iTX8cZbvEXjERIlpIKSVn7PScRlSw + 1DwoTaTewPT5dANPP9vv5ABNNcAzPsn1krQ1_.bPyorrDCQBWScspYXaxyD5 + WogJDPx5.tpKbyvcx.ke7zNRpChO4Uu5HThhh0y8wZYSWWuo5qqXA82ZHzqT + 9ARlQ7Ipvkb18vDmUaLRuCHvsGQh5rSS_ctctbZpvvReA7kOV1y_V_itOE9X + TRJxcQZqqavJUZ0xP9ZAxWc_KiB8BFKwBc_acUbjDr7cRtYLkP89nPFESPH_ + zTku3JwOSGw0.s3vGyEqMxTxAuwLfbf.OHLsRH5eaa0FEg2QMvMDJ4rpFTAm + 8AW08y0Yas.Do1MFuaqX__dn0dOyzvh_jABfSg2mcBqO5XCgo4JG4HNdDUWN + lc8Z82D1zIRm5XZczZa97xi81_bNB8Gut7deqJLasqjpJ4q4S7NpMUaDDC.. + 5beC2z.krETtVHhB1JIQl8gOKLgvJBqEcxvxedbqGpV7lbLXSDgqZG.KobYC + j4jsdXWEJV6hBl.mJggEWlcMSAsVI.ZVPqrtOIcdGhBis3KDAwp2ULlj3Iu4 + hEwgED_.r_adAqcC1GSqAEIMNF4tvvjsN5GvEcwX2hWnEOYFZ6Kp93SilV1l + D3rXsN_d8M5jVAvbFw7qOYFZ5rCr0LXcNFuclqDJznNsY8xMkhvP0PP53lwU + bpZEVuO2UzqA.r_4SeBTHy7tcDvYXlQlW4Q16xYT6sZrE8dXVMrgSBlOKq5G + 1o6N6Xkg2I29H0w.vu2KU6b1WAJlMy2H4dcEv3Zooh5VtQmtYwtmbZDHrIQG + 8lJ381Z9jh7pIFCMsp2epxXWbAqkHd6_r6a3lxpHtnHLWI55RWFI5qNxvxQd + bTIgorpXL.WAmwiLv6MNomPSuHdRy_rHIX9R8DljaWlLKdI_uoa_lbrdjblJ + iokyPUKRSx_VKHi.eIfz9JaFOTdJQACoxmSoL391XOewRlctIBRDTvB6yOss + 7Nt9dmv0ePFvTJN9euRL +X-Originating-IP: [178.255.144.35] +Authentication-Results: mta1067.mail.ird.yahoo.com from=autistici.org; domainkeys=neutral (no sig); from=autistici.org; dkim=pass (ok) +Received: from 127.0.0.1 (EHLO contumacia.investici.org) (178.255.144.35) + by mta1067.mail.ird.yahoo.com with SMTP; Fri, 16 Nov 2012 08:50:26 +0000 +Received: from [178.255.144.35] (contumacia [178.255.144.35]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id D78F1E878B; + Fri, 16 Nov 2012 08:50:23 +0000 (UTC) +X-DKIM: Sendmail DKIM Filter v2.8.2 contumacia.investici.org D78F1E878B +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; + s=stigmate; t=1353055825; + bh=mBzsqJo806YwPoG1l/528KrliiW3q+mkiMzUs+PZfkI=; + h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; + b=RO+bvxnncVKR0YL3Kl8GMbrFsqGikhqR3MzXRrdYewxnNXaSfY55bVw8C9Av108Id + 0FIk7xS/FYydezTX95Ln+kRCU96uKVktfvi9+3M3k5Ht/pAaAnRr5DkQ8AbE8+NFyT + VmQUdEYEqU8x7/DlrMOsrjxyqmA5a5By+75mm5jk= +From: Antonio Quartulli +To: davem@davemloft.net +Cc: netdev@vger.kernel.org, + Simon Wunderlich , + Marek Lindner , + Sven Eckelmann , + Antonio Quartulli , + Simon Wunderlich +Subject: [PATCH] batman-adv: process broadcast packets in BLA earlier +Date: Fri, 16 Nov 2012 09:49:18 +0100 +Message-Id: <1353055758-2901-5-git-send-email-ordex@autistici.org> +X-Mailer: git-send-email 1.8.0 +In-Reply-To: <1353055758-2901-1-git-send-email-ordex@autistici.org> +References: <1353055758-2901-1-git-send-email-ordex@autistici.org> +Status: R +X-Status: N +X-KMail-EncryptionState: +X-KMail-SignatureState: +X-KMail-MDN-Sent: + +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 +Signed-off-by: Simon Wunderlich +Signed-off-by: Antonio Quartulli +Signed-off-by: Marek Lindner +--- + net/batman-adv/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 +