From patchwork Sun Jan 13 23:41:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 2701 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=82.221.99.153; helo=diserzione.investici.org; envelope-from=ordex@autistici.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Received: from diserzione.investici.org (diserzione.investici.org [82.221.99.153]) by open-mesh.org (Postfix) with ESMTPS id 84174601B1F for ; Mon, 14 Jan 2013 00:42:31 +0100 (CET) Received: from [82.221.99.153] (diserzione [82.221.99.153]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id B1281180DB2; Sun, 13 Jan 2013 23:42:26 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 diserzione.investici.org B1281180DB2 From: Antonio Quartulli To: davem@davemloft.net Date: Mon, 14 Jan 2013 09:41:07 +1000 Message-Id: <1358120480-25960-3-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.8.0.2 In-Reply-To: <1358120480-25960-1-git-send-email-ordex@autistici.org> References: <1358120480-25960-1-git-send-email-ordex@autistici.org> MIME-Version: 1.0 Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org, Marek Lindner Subject: [B.A.T.M.A.N.] [PATCH 02/15] batman-adv: Do not add multicast MAC addresses to translation table X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2013 23:42:31 -0000 From: Linus Lüssing The current translation table mechanism is not suitable for multicast addresses and we are currently flooding such frames anyway. Therefore this patch prevents multicast MAC addresses being added to the translation table. Signed-off-by: Linus Lüssing Acked-by: Antonio Quartulli Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- net/batman-adv/soft-interface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 90f4049..f8cc142 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@ -180,7 +180,8 @@ static int batadv_interface_tx(struct sk_buff *skb, goto dropped; /* Register the client MAC in the transtable */ - batadv_tt_local_add(soft_iface, ethhdr->h_source, skb->skb_iif); + if (!is_multicast_ether_addr(ethhdr->h_source)) + batadv_tt_local_add(soft_iface, ethhdr->h_source, skb->skb_iif); /* don't accept stp packets. STP does not help in meshes. * better use the bridge loop avoidance ...