From patchwork Sat Nov 5 17:24:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 1368 Return-Path: Received: from cora.hrz.tu-chemnitz.de (cora.hrz.tu-chemnitz.de [134.109.228.40]) by open-mesh.org (Postfix) with ESMTPS id F21946007C8 for ; Sat, 5 Nov 2011 18:24:56 +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:Cc:To:From; bh=TC4399eXDtnE/dlaFVXlnAfReONETbfOa339/56Zo+Y=; b=vAhmSSSwB9a1r+yShfdA73zkWUSk9jsPeyTE4OG3adc42z9ZSZMIlx7lXOXJE83E69U/5IWw2wTnNkb68UMVYx6nbCk+hldrsBOlUoPYY7X+lUY7Y3if5/bpLk03Sh3CXYHhPjYqmr2OUwMNtz8NG2x5GPL9MjEx6HomMomIZC4=; Received: from p57aa0226.dip0.t-ipconnect.de ([87.170.2.38] helo=pandem0nium) by cora.hrz.tu-chemnitz.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RMjzE-00016e-Fq; Sat, 05 Nov 2011 18:24:56 +0100 Received: from dotslash by pandem0nium with local (Exim 4.72) (envelope-from ) id 1RMjz1-0007Og-BN; Sat, 05 Nov 2011 18:24:43 +0100 From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org Date: Sat, 5 Nov 2011 18:24:19 +0100 Message-Id: <1320513862-28360-9-git-send-email-siwu@hrz.tu-chemnitz.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1320513862-28360-1-git-send-email-siwu@hrz.tu-chemnitz.de> References: <1320513862-28360-1-git-send-email-siwu@hrz.tu-chemnitz.de> X-Spam-Score: -1.0 (-) X-Spam-Report: --- Textanalyse SpamAssassin 3.3.1 (-1.0 Punkte) Fragen an/questions to: Postmaster TU Chemnitz * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP --- Ende Textanalyse X-Scan-Signature: cb5add96829c288e5da73fa3a8e2275c Cc: Simon Wunderlich Subject: [B.A.T.M.A.N.] [PATCH 08/11] 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: Sat, 05 Nov 2011 17:24:57 -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 46dd328..0451c63 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;