From patchwork Thu Sep 10 14:16:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Ivanov X-Patchwork-Id: 516294 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id EA68814030C for ; Fri, 11 Sep 2015 00:16:45 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ubnt.com header.i=@ubnt.com header.b=F3lkNRl+; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 023DA28BBC7; Thu, 10 Sep 2015 16:15:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 9A0112873ED for ; Thu, 10 Sep 2015 16:15:01 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .ubnt. - helo: .mail-lb0-f180.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com [209.85.217.180]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Thu, 10 Sep 2015 16:15:00 +0200 (CEST) Received: by lbbmp1 with SMTP id mp1so23917809lbb.1 for ; Thu, 10 Sep 2015 07:16:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ubnt.com; s=google; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=TQbdxk0pWdZ9rB57X3dHUogLoqQ7nCaGGhxuzvwU4ug=; b=F3lkNRl+lBKE47mU7zRMP227hn/lD3FF/8jIVk01Km0rV1Yx/OVlCrYYV6Pef3sMZz f2Ek0K0gZp2wmfvYwttC+N5Z5qXlhmRjwhqTEcUhEIfLFQUaUCpqh7V8K2TqLdzof+3S +UzCoFPXDh7tgukg0a4WX6xF8fo7Ege3DCHnU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=TQbdxk0pWdZ9rB57X3dHUogLoqQ7nCaGGhxuzvwU4ug=; b=GScJQIcMCc7VBQ7+mU2CG7Aiij1IKABH+pxAaSnieK8Xgs2NmnGHtU4OJMlT3fVpvu Ii3NhQsdTaTCc7qYNhwdtKPtA2hlYVGvUpADhItX8ziYD+FUrTwqSsgFo7I0y9JmyMoB Rys8hIjmP9YcucBUFo+QQxnshp8oaO+cB5vfHJR2yVY0fmrdiZ0BDjR28JIHacI99EZ6 +jWLM/Mm94sGMU9abo32Vf0WYo30p+BN4jFX65LTfvXqq0Xfe9rZHBP983iwS7BlWg9H 1QGNnUCC/Mm3FerCM3kF/m1ORto3ihbuqWvzpJPjxwMwX6cuBmrl6EvlsE3yGmqBmb4J 2NXQ== X-Gm-Message-State: ALoCoQniTitkLZTWHmvIk4RvSgDyhgYaN6tku7clRLA5WckRXW1Qg/bB+nMQrKAPjb1SKpGYViEY9xGkhVN3Lx+pBqoq/yGGBZpfdV6llc5sedUbNpgXg4n9qXkv80/5tLCWESpyTU+uCQfCciGSbD0col9lhRV47idrtXv07fmmvMPkypjeVfpDV7GfhtkUEDs2WxAvOCV4 X-Received: by 10.112.169.8 with SMTP id aa8mr36045682lbc.90.1441894565715; Thu, 10 Sep 2015 07:16:05 -0700 (PDT) Received: from di ([80.233.186.214]) by smtp.gmail.com with ESMTPSA id n9sm2699969lbs.28.2015.09.10.07.16.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Sep 2015 07:16:05 -0700 (PDT) Date: Thu, 10 Sep 2015 17:16:04 +0300 From: Dmitry Ivanov To: openwrt-devel@lists.openwrt.org Message-Id: <20150910171604.3e3bef63c7ae318e8a66a982@ubnt.com> In-Reply-To: References: <20150910160039.4fcf270451cd2f3891ecdaf7@ubnt.com> <20150910133951.GC8386@odroid> X-Mailer: Sylpheed 3.5.0beta1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) Mime-Version: 1.0 Subject: [OpenWrt-Devel] [PATCH][netifd] Do not enable multicast_to_unicast by default X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Do not enable multicast_to_unicast by default. Duplicate broadcast and multicast frames may cause problems in WDS setup. Wireless clients cannot obtain IP address etc. Signed-off-by: Dmitry Ivanov --- scripts/netifd-wireless.sh | 2 +- system-linux.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/netifd-wireless.sh b/scripts/netifd-wireless.sh index 83a8223..774a503 100644 --- a/scripts/netifd-wireless.sh +++ b/scripts/netifd-wireless.sh @@ -256,7 +256,7 @@ _wireless_set_brsnoop_isolation() { [ $isolate -gt 0 -o -z "$network_bridge" ] && return - [ -z "$multicast_to_unicast" ] && multicast_to_unicast=1 + [ -z "$multicast_to_unicast" ] && multicast_to_unicast=0 [ $multicast_to_unicast -gt 0 ] && json_add_boolean isolate 1 } diff --git a/system-linux.c b/system-linux.c index 01500a5..6994ace 100644 --- a/system-linux.c +++ b/system-linux.c @@ -576,12 +576,11 @@ static char *system_get_bridge(const char *name, char *buf, int buflen) static void system_bridge_set_wireless(struct device *bridge, struct device *dev) { - bool mcast_to_ucast = true; + bool mcast_to_ucast = false; bool hairpin = true; - if (bridge->settings.flags & DEV_OPT_MULTICAST_TO_UNICAST && - !bridge->settings.multicast_to_unicast) - mcast_to_ucast = false; + if (bridge->settings.flags & DEV_OPT_MULTICAST_TO_UNICAST) + mcast_to_ucast = bridge->settings.multicast_to_unicast; if (!mcast_to_ucast || dev->wireless_isolate) hairpin = false;