From patchwork Tue Dec 27 16:51:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 1500 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 6B4276007F5 for ; Tue, 27 Dec 2011 17:51:33 +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=bezujTfXavOPwduIy/EbUhsav3jjCksdguiMEFtMhGE=; b=wFBsVMCocPj7ae6dgH9ewAABXNgHHdk1gk78BxnDR7NgWf1saxS+vzWGG8OOEPdmElzf6ygnITTp7Y1q9Knj2QOonYN/KwU/hyZ+ErEfFyC9O9NRGclJD/N4MU9D3ABlmiqJkALvcLt+qbfykmOMMlsvhrnJSe5KWIsHRppbL7M=; Received: from p57aa0ef6.dip0.t-ipconnect.de ([87.170.14.246] helo=pandem0nium) by cora.hrz.tu-chemnitz.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RfaFQ-0006qV-Gi for b.a.t.m.a.n@lists.open-mesh.org; Tue, 27 Dec 2011 17:51:33 +0100 Received: from dotslash by pandem0nium with local (Exim 4.72) (envelope-from ) id 1RfaFI-0004Nh-00 for b.a.t.m.a.n@lists.open-mesh.org; Tue, 27 Dec 2011 17:51:24 +0100 From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org Date: Tue, 27 Dec 2011 17:51:20 +0100 Message-Id: <1325004682-16792-9-git-send-email-siwu@hrz.tu-chemnitz.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1325004682-16792-1-git-send-email-siwu@hrz.tu-chemnitz.de> References: <1325004682-16792-1-git-send-email-siwu@hrz.tu-chemnitz.de> X-RBL-Warning: 87.170.14.246 is listed at zen.spamhaus.org X-Scan-AV: cora.hrz.tu-chemnitz.de; 2011-12-27 17:51:33; daf86eba646614bf8c62b301abe7de16 X-Scan-SA: cora.hrz.tu-chemnitz.de; 2011-12-27 17:51:33; ecf6bb14c539821205c4ea81a7eed7c6 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.] [PATCHv2 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: Tue, 27 Dec 2011 16:51:33 -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 0f50a7d..d3f520f 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;