Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2619491imw; Sun, 17 Jul 2022 12:58:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uYXrkej8ZbOjXs4YAFf6trOvouCX50V+nu+ufurNXJi5BrsR1rCRca6bROxmL0XPrVGG9r X-Received: by 2002:a17:906:9bd1:b0:72b:302:2b88 with SMTP id de17-20020a1709069bd100b0072b03022b88mr23300368ejc.250.1658087926183; Sun, 17 Jul 2022 12:58:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658087926; cv=none; d=google.com; s=arc-20160816; b=lfCs6kRNiGW4ob64jz2NFI8nnJBsd8+mD+H97jg4jRZa+Yr5Ib4V9qzoqcgamQJ3vP YzkCkuxKd1aBe1YQuom/bHQ1wScaLNH6SX5bATWNp4S1MlNSOZPbTABJagcm53RzlGVi FSnEjvGdXs3I9NvyVweV+gP04j7OcRxPmQ5GVQqrrd3AV9F5cD+J8pACtSo3tuBKEeBX iv4hQhfFTO4dxOWcNis2NeGb6u3/22qp6VDu99QkAms4coyVNZaIyG/oxr8L9dpEV4Tn wqShGSF4btvvM6OXIXxaYJTsJnemwSZgTg+6QxFZ6ajeqlP3JIjp3oTbYGaJJbR4AziH nt5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=qR5n9WUGINQgKnZyU5jQ5QNhAVmTXkoQM4VlFrsXDgk=; b=KdnX7/COP6v9Ou78QqbIWzW0TVlN9CUA+fbNxGucTxPpKLcZZz/lPvl/iCSLn8SXHR Cc+ic6enf1x90obgOfNTzxbWC3ccxGxeGzpz9Xxi4Xl1LecLdbRwa0piuag29pefKCGA u2ZAWPfsn7ZBjp+K71dWJW3T9qyXDqItc+guefkJ8F9gog7dqLNwdknWH55GxY9DzbaN wEHEDgTcwyACrIMeFu+PcvMbOUrnTwFO1rAZjUNJki9yAh3AZ9PlGZs8DgvzXLMLpnsu K0owIVSP9Bb56jAAbcyvB11/cKmyeyDjNNWK70giXZd2F4y6//q5r9Y/QnEKpcPOORT3 oG0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ROVMbcMO; 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 gn11-20020a1709070d0b00b0072b52b30699si15598653ejc.76.2022.07.17.12.58.21; Sun, 17 Jul 2022 12:58:46 -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=ROVMbcMO; 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 S231792AbiGQTXH (ORCPT + 99 others); Sun, 17 Jul 2022 15:23:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231240AbiGQTXE (ORCPT ); Sun, 17 Jul 2022 15:23:04 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F289DEFE; Sun, 17 Jul 2022 12:23:03 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id d16so14302239wrv.10; Sun, 17 Jul 2022 12:23:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qR5n9WUGINQgKnZyU5jQ5QNhAVmTXkoQM4VlFrsXDgk=; b=ROVMbcMOPv+gSbm3EJ0AYvQs8xJipm3EB1VIKbnQn0ywYyjAGUA0Sburuurfmr9fUI rXNM9c07v1017JK3vINOTZx/AP9ykov02Jip4XVZnRtdWqGlyYt0b7KURU1CVr5wzdhp 1lvZdqtbFjtmc7jGXNELiIePVrkhIL++Y0v1Aq7AwuWe0ansFrJW49xDHVWY7rdOoYVC 7Wsn78PS/3tFE8TP6FafTmxr6V3M3z9c7hZSHZVILX6qzAVgd+KXlezcymqZVSCDuiVV SHKpRhuds0LZqUWv1a1DfGN/NCy+t8089iHEj92aJDiFrtNMqN/wlagxvmDCmnfmd39k fK7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qR5n9WUGINQgKnZyU5jQ5QNhAVmTXkoQM4VlFrsXDgk=; b=t/limwnQZrB0uI1QoVZJiFunrZqrv9z6aPMf26GLGpBfiYSIkh9GvyfJDwZ0SXxfcM R6sJreh67n2GMTassuYfpWpKkd0IqSg1j5D1JqXDDluHOeYX6ssvORTGOEcptiPKa0Lh RwbxAs7BnS3HNnTQBzM9rAGAvSmJoh58RHqBnfJ8KEefYExLity676cFKH8KIvjcxZd8 UNRdZzL/KqUnPwXJbTgv0h5G+bspyMACSv4hzC4G9R0tZpHoXqcatirOfoI4J3rrAU3Z S+YpEs72jti4UBGMMgRDCQA09kLiOE1wJ19I6j6/vKld2MwK0mbyGGgKOPfehwFl044z pk/g== X-Gm-Message-State: AJIora9VPCvZBEdGzXODqqL0XfTU40fwZc/Xi6mPAbCbncruHB7SDUg9 tu6v+32OXMMIdCVy2PdDulYltRmPeuc9rWsZGpo= X-Received: by 2002:a5d:6e8e:0:b0:21d:ea5:710f with SMTP id k14-20020a5d6e8e000000b0021d0ea5710fmr27515wrz.48.1658085782164; Sun, 17 Jul 2022 12:23:02 -0700 (PDT) MIME-Version: 1.0 References: <20220630111634.610320-1-hans@kapio-technology.com> <20220717134610.k3nw6mam256yxj37@skbuf> <20220717140325.p5ox5mhqedbyyiz4@skbuf> <20220717183852.oi6yg4tgc5vonorp@skbuf> In-Reply-To: <20220717183852.oi6yg4tgc5vonorp@skbuf> From: Hans S Date: Sun, 17 Jul 2022 21:20:57 +0200 Message-ID: Subject: Re: [PATCH net-next v1 1/1] net: bridge: ensure that link-local traffic cannot unlock a locked port To: Vladimir Oltean 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 Content-Type: text/plain; charset="UTF-8" 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 8:38 PM Vladimir Oltean wrote: > > On Sun, Jul 17, 2022 at 06:22:57PM +0200, Hans S wrote: > > On Sun, Jul 17, 2022 at 4:03 PM Vladimir Oltean wrote: > > > > Yes, it creates an FDB entry in the bridge without the locked flag > > set, and sends an ADD_TO_DEVICE notice with it. > > And furthermore link-local packets include of course EAPOL packets, so > > that's why +learning is a problem. > > So if we fix that, and make the dynamically learned FDB entry be locked > because the port is locked (and offload them correctly in mv88e6xxx), > what would be the problem, exactly? The +learning is what would allow > these locked FDB entries to be created, and would allow the MAB to work. > User space may still decide to not authorize this address, and it will > remain locked. The alternative is to have -learning and let the driver only enable the PAV to admit the interrupts, which is what this implementation does. The plus side of this is that having EAPOL packets triggering locked entries from the bridge side is not really so nice IMHO. In a situation with 802.1X and MAB on the same port, there will then not be any triggering of MAB when initiating the 802.1X session, which I think is the best option. It then also lessens the confusion between hostapd and the daemon that handles MAB sessions.