From patchwork Sun Aug 19 18:10:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 2235 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 D22B6600850 for ; Sun, 19 Aug 2012 20:09:59 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=pass reason="1024-bit key; insecure key" header.i=@tu-chemnitz.de header.b=kZ8mRnag; dkim-adsp=none (insecure policy); dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tu-chemnitz.de; s=dkim2010; h=Message-Id:Date:Subject:Cc:To:From; bh=wQQDSunP10aYCwaqXZh1xyaJS2ptG4X17+fd4EV6bAY=; b=kZ8mRnagX2EEgdlN6tKS5W2eNjxGlyNKamWZiIUBdhi7uoe4SL4BFVPFdFiyBDHGWKJPOEYgMcHrAofDL8xsi5HGrOPTB/Bv3qHK5b3R4L30P9lzlKMnwb/L3dPuAeahj54eIYVZLpbeMT42gn0s+WjPmt1f9NZV+tQIczxvIfs=; Received: from p57aa05f8.dip0.t-ipconnect.de ([87.170.5.248] helo=pandem0nium) by nick.hrz.tu-chemnitz.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.80) (envelope-from ) id 1T39wl-00020v-0m; Sun, 19 Aug 2012 20:09:59 +0200 Received: from dotslash by pandem0nium with local (Exim 4.72) (envelope-from ) id 1T39x0-0002OW-KQ; Sun, 19 Aug 2012 20:10:14 +0200 From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 19 Aug 2012 20:10:09 +0200 Message-Id: <1345399809-9177-1-git-send-email-siwu@hrz.tu-chemnitz.de> X-Mailer: git-send-email 1.7.2.5 X-purgate: clean X-purgate-type: clean X-purgate-ID: 154106::1345399799-00002FEE-AB12E32B/0-0/0-0 X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-Scan-AV: nick.hrz.tu-chemnitz.de; 2012-08-19 20:09:59; bcad40c82854be44016fb7a555308e6d X-Scan-SA: nick.hrz.tu-chemnitz.de; 2012-08-19 20:09:59; c6dbbabcb8f1a1279aad9df8509943cf 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 Cc: Simon Wunderlich Subject: [B.A.T.M.A.N.] [RFC] batman-adv: don't allow ECTP traffic on batman-adv 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, 19 Aug 2012 18:10:00 -0000 We have seen this to break networks when used with bridge loop avoidance. As we can't see any benefit from sending these ancient frames via our mesh, we just drop them. Signed-off-by: Simon Wunderlich --- soft-interface.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/soft-interface.c b/soft-interface.c index 1aee7db..f04a605 100644 --- a/soft-interface.c +++ b/soft-interface.c @@ -143,8 +143,10 @@ static int batadv_interface_tx(struct sk_buff *skb, struct batadv_bcast_packet *bcast_packet; struct vlan_ethhdr *vhdr; __be16 ethertype = __constant_htons(BATADV_ETH_P_BATMAN); - static const uint8_t stp_addr[ETH_ALEN] = {0x01, 0x80, 0xC2, 0x00, 0x00, - 0x00}; + static const uint8_t stp_addr[ETH_ALEN] = {0x01, 0x80, 0xC2, 0x00, + 0x00, 0x00}; + static const uint8_t ectp_addr[ETH_ALEN] = {0xCF, 0x00, 0x00, 0x00, + 0x00, 0x00}; unsigned int header_len = 0; int data_len = skb->len, ret; short vid __maybe_unused = -1; @@ -177,10 +179,16 @@ static int batadv_interface_tx(struct sk_buff *skb, /* don't accept stp packets. STP does not help in meshes. * better use the bridge loop avoidance ... + * + * The same goes for ECTP sent at least by some Cisco Switches, + * it might confuse the mesh when used with bridge loop avoidance. */ if (batadv_compare_eth(ethhdr->h_dest, stp_addr)) goto dropped; + if (batadv_compare_eth(ethhdr->h_dest, ectp_addr)) + goto dropped; + if (is_multicast_ether_addr(ethhdr->h_dest)) { do_bcast = true;