From patchwork Wed Apr 21 18:44:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 425736 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1ADF6C433ED for ; Wed, 21 Apr 2021 18:44:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C09306144D for ; Wed, 21 Apr 2021 18:44:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244835AbhDUSpU (ORCPT ); Wed, 21 Apr 2021 14:45:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233038AbhDUSpT (ORCPT ); Wed, 21 Apr 2021 14:45:19 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5058C06174A for ; Wed, 21 Apr 2021 11:44:45 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id j7so21337533pgi.3 for ; Wed, 21 Apr 2021 11:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hmDaabGWp0ttp9pxTYH3OJJsh68hCp1NN8uFsOzUlSQ=; b=nd1BehaWw5XT9mLa9edLT+lH8Iwi+QPf+P3RHI2c9NPgad4xYpQsu0awmxjth7wgYK wmuQptkuoHQcEGjKd3QnL0Z4QEsFJ9Zc1HrnWQGgxMoM3SmBz49oNur3AdY7AIbCGKVT rkzvtGCd15iQEUPmKBKrDMfkFCJVYUxK5xBtlh3JEBkzlcndEHMFEMikojThNWAJ3TWN KjyC8AEPEpXeMa6+GSVYeZHPNWLIEGOKXL+kF2UeSWHtq2NejZwYssbQ4CpGgoDtFC0G 4dZAcnO94fVG7jEVzhC0Tl4xKfBO6Na1MKol0y6VDzHNMRbqZLwVX1B+vTK4AO8jEiwa lKtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hmDaabGWp0ttp9pxTYH3OJJsh68hCp1NN8uFsOzUlSQ=; b=fn0lDm4WJBcE+JFxGyirAwt6aau+8FCq04/yI0rNfwMKn1IuxwLYyDQRs/ZlIAGEDh bJ1a6lqe84KxUnpL2YfOg7GcvVJgKtWZdkr+iVs+VOiHDUo9Mt3NuqS/vBnwA5QaAFzt rOr+UD34EFf6LZmZPk3O/ghn2tuNPLAzBXKtUA5D9A4KhPjlkb52V472EuFXTUWZf9Ta YgOb0KxL/q7/rlNysTm4dPgTytkUq85FGEIFDICpUS1BgsaktRlUBwB4gzY01ex674Dw 7LKafzQpe0UETgJ8eMcvso75R9jsePI4fMtGGRFUD3PNyO0a7R0adwNmh5oth4z+ZLY+ dvdw== X-Gm-Message-State: AOAM530cwp6qQI9c4NpCxRl5PHUcAkPOckAMHE6MuCCQMSWkuMfvnzMI VfNCm2VNlDynuQ/uEP8lT7A= X-Google-Smtp-Source: ABdhPJxl0EGvUrvf/OCfB64+IYv97QB9RuXKUePHjiNBmONLNzA0YTlqxz8u2Oxbs+6xB5KxANtezg== X-Received: by 2002:a63:f008:: with SMTP id k8mr22894788pgh.15.1619030685359; Wed, 21 Apr 2021 11:44:45 -0700 (PDT) Received: from localhost.localdomain (5-12-16-165.residential.rdsnet.ro. [5.12.16.165]) by smtp.gmail.com with ESMTPSA id w1sm130128pgp.31.2021.04.21.11.44.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Apr 2021 11:44:44 -0700 (PDT) From: Vladimir Oltean To: Jakub Kicinski , "David S. Miller" , Christian Borntraeger , netdev@vger.kernel.org Cc: Florian Fainelli , Andrew Lunn , Jiri Pirko , Ido Schimmel , Roopa Prabhu , Nikolay Aleksandrov , Vladimir Oltean Subject: [PATCH net-next] net: bridge: fix error in br_multicast_add_port when CONFIG_NET_SWITCHDEV=n Date: Wed, 21 Apr 2021 21:44:20 +0300 Message-Id: <20210421184420.1584100-1-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vladimir Oltean When CONFIG_NET_SWITCHDEV is disabled, the shim for switchdev_port_attr_set inside br_mc_disabled_update returns -EOPNOTSUPP. This is not caught, and propagated to the caller of br_multicast_add_port, preventing ports from joining the bridge. Reported-by: Christian Borntraeger Fixes: ae1ea84b33da ("net: bridge: propagate error code and extack from br_mc_disabled_update") Signed-off-by: Vladimir Oltean Acked-by: Nikolay Aleksandrov --- net/bridge/br_multicast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 4daa95c913d0..2883601d5c8b 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c @@ -1625,7 +1625,7 @@ int br_multicast_add_port(struct net_bridge_port *port) br_opt_get(port->br, BROPT_MULTICAST_ENABLED), NULL); - if (err) + if (err && err != -EOPNOTSUPP) return err; port->mcast_stats = netdev_alloc_pcpu_stats(struct bridge_mcast_stats);