From patchwork Sun Oct 30 22:51:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 1302 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 879126007CD for ; Sun, 30 Oct 2011 23:51: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:Cc:To:From; bh=GR92sPWE7gVVuY5rtPv7FBLANiER+YicoGJUMgA1dFk=; b=quY0jOXYkn0eGT0/VLLhNkzPLZE+uAiGb8LfxVGH8IB0mYM5ZXvk6cqM9pdKyonI9wKOHF1XbXhFjD6zbI6VFU3aW5dhhCv+LN35DGNIEkXroLGqD62eaViiQ54x4TgUtVLnRF1f3CRC2MV6bhabJ/FvUyq9pgC+lVzFsshjhJ0=; Received: from p57aa138b.dip0.t-ipconnect.de ([87.170.19.139] helo=pandem0nium) by cora.hrz.tu-chemnitz.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RKeE2-000255-Si; Sun, 30 Oct 2011 23:51:35 +0100 Received: from dotslash by pandem0nium with local (Exim 4.72) (envelope-from ) id 1RKeDv-0002hV-KW; Sun, 30 Oct 2011 23:51:27 +0100 From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 30 Oct 2011 23:51:09 +0100 Message-Id: <1320015072-10313-9-git-send-email-siwu@hrz.tu-chemnitz.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1320015072-10313-1-git-send-email-siwu@hrz.tu-chemnitz.de> References: <1320015072-10313-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: 2da4cb75faf7b3f12212370ffd4cc0ae Cc: Simon Wunderlich Subject: [B.A.T.M.A.N.] [RFC 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: Sun, 30 Oct 2011 22:51:35 -0000 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..7f7efb9 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[6] = {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;