From patchwork Sun Jan 22 19:00:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 1499 Return-Path: Received: from nick.hrz.tu-chemnitz.de (nick.hrz.tu-chemnitz.de [134.109.228.11]) by open-mesh.org (Postfix) with ESMTPS id A161560084F for ; Sun, 22 Jan 2012 20:00:35 +0100 (CET) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@tu-chemnitz.de; dkim-adsp=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tu-chemnitz.de; s=dkim2010; h=References:In-Reply-To:Message-Id:Date:Subject:To:From; bh=XG6m4vjLiKKneggtMlLzK1OOl2TK38OUa9wcXs9QGy8=; b=D90LOo5lLP7+qzvuuUActahK4l8YOBIbyXthray8piItkYuuFRvyRNBPQlwzbHj6g2vhqF6tXAIPlqgStf6Te+xGdqyRSi/o/7xGoj8nIahOpecD/MlcJuciI5XDP6OR7z93ZcECldpDDzqJtmyqP/Pg65EalR2h93v6TbABs30=; Received: from p57aa022b.dip0.t-ipconnect.de ([87.170.2.43] helo=pandem0nium) by nick.hrz.tu-chemnitz.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Rp2eY-0006MO-M5 for b.a.t.m.a.n@lists.open-mesh.org; Sun, 22 Jan 2012 20:00:35 +0100 Received: from dotslash by pandem0nium with local (Exim 4.72) (envelope-from ) id 1Rp2eS-0003cS-1q for b.a.t.m.a.n@lists.open-mesh.org; Sun, 22 Jan 2012 20:00:28 +0100 From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 22 Jan 2012 20:00:25 +0100 Message-Id: <1327258827-13861-9-git-send-email-siwu@hrz.tu-chemnitz.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1327258827-13861-1-git-send-email-siwu@hrz.tu-chemnitz.de> References: <1327258827-13861-1-git-send-email-siwu@hrz.tu-chemnitz.de> X-RBL-Warning: 87.170.2.43 is listed at zen.spamhaus.org X-Scan-AV: nick.hrz.tu-chemnitz.de; 2012-01-22 20:00:35; 599026a2b24c581093b2d255e9c3291f X-Scan-SA: nick.hrz.tu-chemnitz.de; 2012-01-22 20:00:35; 0152b5c5893d02375993127b5bcf821c X-Spam-Score: 1.5 (+) X-Spam-Report: --- Textanalyse SpamAssassin 3.3.1 (1.5 Punkte) Fragen an/questions to: Postmaster TU Chemnitz * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 2.5 TUC_RBL RBL: Mail von bekanntem Spam-Relay oder Dialup (TUC) --- Ende Textanalyse Subject: [B.A.T.M.A.N.] [PATCHv3 08/10] batman-adv: drop STP over batman X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 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, 22 Jan 2012 19:00:35 -0000 Signed-off-by: Simon Wunderlich --- [2011-11-04] always use ETH_ALEN Signed-off-by: Simon Wunderlich --- soft-interface.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/soft-interface.c b/soft-interface.c index 03cbd9b..59c19aa 100644 --- a/soft-interface.c +++ b/soft-interface.c @@ -129,6 +129,7 @@ static int interface_tx(struct sk_buff *skb, struct net_device *soft_iface) struct hard_iface *primary_if = NULL; struct bcast_packet *bcast_packet; struct vlan_ethhdr *vhdr; + uint8_t stp_addr[ETH_ALEN] = {0x01, 0x80, 0xC2, 0x00, 0x00, 0x00}; unsigned int header_len = 0; int data_len = skb->len, ret; short vid = -1; @@ -158,6 +159,11 @@ static int interface_tx(struct sk_buff *skb, struct net_device *soft_iface) /* Register the client MAC in the transtable */ 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 ... */ + if (compare_eth(ethhdr->h_dest, stp_addr)) + goto dropped; + if (is_multicast_ether_addr(ethhdr->h_dest)) { do_bcast = true;