Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2379316imw; Sun, 17 Jul 2022 07:34:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vHDGmgiyXr23YeADP2bZjYkgJNMK0PCS7w/itw+y5P3pPoO5JMvuZekJVoNhWxiYzGEHzU X-Received: by 2002:a05:6402:2812:b0:43a:9041:d5db with SMTP id h18-20020a056402281200b0043a9041d5dbmr31360238ede.208.1658068457850; Sun, 17 Jul 2022 07:34:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658068457; cv=none; d=google.com; s=arc-20160816; b=CYA3OxYB6I/nAf/zFd6y0CEQRrWFO4wvgn7l8LtZ6Mr57u6R5+2mPjX2RCRV2hOfbm l7Fe2flwaJ9PpeBvQRueUpThEuIBu0IGEWivGnqp2QFFQPD+NfwLzey/OT6wSJQkA1Dj mS227QSKjbY8Yq/jIii92DRVymlJpN1QDE98N7veQRocGNMxg4hdItGxI/84vdDhJf64 75r+zPP3/B9kda+vUcIwscaewHU2mvLC+sLTcheODqr8RqxQJx210vtplvqAqzwrkwgL iA47aSgUj3yLsTAHDd0nGgrJh+YBJEDsPZTv3VikhFdC6P4qBjIb2X6qU1v56sHhfANy Dr7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jMRTq+amxNbsBbaOEm6j4FB9NZ1ewtvtmU0mvf4Nm0M=; b=RdxraQQY85SaTV1YY7hiF9YIeNKzGi/7t7fEO2Jr2osjQTKpTAMj7II2rbWnmfPzQd /CDyji/Yw0udMlPpMVjVR4fH2hkKLDqvhOsCAyxa3v1gHSNcTVFGi1pkOmKnErAdxgia wFDiin3Vx/xEsOifCWkpNSNmSru0dtBIABUT//5eUAS29bKzuaG1YZHuVOG1M44URL0D UQuHOmglADc70nWW5fMsJdRStUSbL6Ii2rbparLs2525ygEZDcYtgXUsCmQSzR4HkvuL 2c+GhJI8phtPdG/+pUIK9nszjcbvvneka70ayXewlfkkiKTd+oW+rsUtHs6l4K31wzGg wnuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IOfVoC11; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht8-20020a170907608800b0072b4da1abe2si13504051ejc.791.2022.07.17.07.33.45; Sun, 17 Jul 2022 07:34:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IOfVoC11; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233095AbiGQODe (ORCPT + 99 others); Sun, 17 Jul 2022 10:03:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229801AbiGQODc (ORCPT ); Sun, 17 Jul 2022 10:03:32 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA2B912D36; Sun, 17 Jul 2022 07:03:30 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id k30so12083613edk.8; Sun, 17 Jul 2022 07:03:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=jMRTq+amxNbsBbaOEm6j4FB9NZ1ewtvtmU0mvf4Nm0M=; b=IOfVoC11XaS/bWBvLr7Vh11vHQNhwzU0vVkGdNo3Legzm2DOd3dsW/pf8Rh9UjPWvX JuW4lEESZ/2apkqE1vo/b/0jvOg/Jf4+7VMt8UaL99wPJ+sn56IuX483kWkcZN3oyoVm XToQ4LXI+rik0Y+WztVuU70lo5i92MQulNSXG7vji4vHLtK/VwnrCQx63blturHmJvML cdzmEn1GlbHtzRPNw4I/rTk14965Bq/tNQPmfHAUuE5JyL3ItbnQrRJuMi9apyDejczM I9t/HENKdlD8vqV7gjUbiCQrU9DiPG1mqk0a1iu25lYshFwxl9SoPiX/JQwBuvT5557j EhWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=jMRTq+amxNbsBbaOEm6j4FB9NZ1ewtvtmU0mvf4Nm0M=; b=uS0C73axe89jQHTLqaaXeK14o9vscVluAk0N1Gy8zfgOb9k+g1Phsimld93pBV9Z22 PVtsnLGRe/K9g61JE2nZZJs6lndRsPAbpPIs9XjPKpDOharYS979TC4WiDWgen3IEW2k 3FPhQtQf3R6INMtFaepoicJ+bBij+/DTuYlS9EsAy9NzhThAHzgQ14orZoRf5t9N7R0j k9/yvzI6//rzUGi15HOuw8EHFjtsAlssIWlSIJ2q5QiUV2dutlnovTx4ziP8qINhiRe0 uIxiwZ4FGmFwDoNl/kUKqY7RlR99sY5qYq/vGd8WLnIAbFCk9zdId8Y9CkZ5DS4guprP tW+g== X-Gm-Message-State: AJIora8Sw4X6uRu109OBQvc59OfAd1cLHR4xMyj35/WY3xFfPDALM9TH gmGAGULWa59roUnOmLGwT0s= X-Received: by 2002:a05:6402:d0a:b0:437:66ca:c211 with SMTP id eb10-20020a0564020d0a00b0043766cac211mr31694104edb.29.1658066609442; Sun, 17 Jul 2022 07:03:29 -0700 (PDT) Received: from skbuf ([188.25.231.115]) by smtp.gmail.com with ESMTPSA id 2-20020a170906218200b0072a815f3344sm4348879eju.137.2022.07.17.07.03.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jul 2022 07:03:28 -0700 (PDT) Date: Sun, 17 Jul 2022 17:03:25 +0300 From: Vladimir Oltean To: Hans S Cc: Ido Schimmel , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Andrew Lunn , Vivien Didelot , Florian Fainelli , Eric Dumazet , Paolo Abeni , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Nikolay Aleksandrov , Shuah Khan , Daniel Borkmann , Hans Schultz , linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH net-next v1 1/1] net: bridge: ensure that link-local traffic cannot unlock a locked port Message-ID: <20220717140325.p5ox5mhqedbyyiz4@skbuf> References: <20220630111634.610320-1-hans@kapio-technology.com> <20220717134610.k3nw6mam256yxj37@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220717134610.k3nw6mam256yxj37@skbuf> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 17, 2022 at 04:46:10PM +0300, Vladimir Oltean wrote: > Here, what happens is that a locked port learns the MAC SA from the > traffic it didn't drop, i.e. link-local. In other words, the bridge > behaves as expected and instructed: +locked +learning will cause just > that. It's the administrator's fault for not disabling learning. > It's also the mv88e6xxx driver's fault for not validating the "locked" + > "learning" brport flag *combination* until it properly supports "+locked > +learning" (the feature you are currently working on). > > I'm still confused why we don't just say that "+locked -learning" means > plain 802.1X, "+locked +learning" means MAB where we learn locked FDB entries. Or is it the problem that a "+locked +learning" bridge port will learn MAC SA from link-local traffic, but it will create FDB entries without the locked flag while doing so? The mv88e6xxx driver should react to the 'locked' flag from both directions (ADD_TO_DEVICE too, not just ADD_TO_BRIDGE).