Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3016141pxb; Mon, 18 Oct 2021 06:39:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8dNTWhlWS6dfuqJb+DArjVYVeExGbVJtvDieHzX4Kd01E2b65gWYsW70kLncf4zZQR+n0 X-Received: by 2002:a63:4754:: with SMTP id w20mr23726213pgk.98.1634564396149; Mon, 18 Oct 2021 06:39:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634564396; cv=none; d=google.com; s=arc-20160816; b=u7l7WUQ5SRHmvgenlpt6WjjEdIvDoZ7vxQXvMUUhqU/b8xy0dA94oPS945T1RtcH9J +CtqF4221tt1Y845UOv+KQzWMYjjvyIZoeFUAt/FaNPKa3YKfp1KFONuh4h78Yv/oUKD y9rNcdqsk1I4HtPLhgj77QFdB7eNBApMudfqfdlZc5XCRmsC0P1cGz61UodwVWdE5/Z/ irI+0ugD8VNv6M39W+hoRjznkSk+cxxQwhgwk/zBY/FtdfUpzvLAD/6Melah0M1VI+lN fAe8O/mBKO8nhiBs9/a3kBscDZmaKH21diSi7HMx5B89tS/HClfRHkPYrzfapB3e36Sm XW1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qHAl+PwkXxpMvZrrLIoOnJWY71P35gX1lvGYOS1RrcQ=; b=UQiMr6ItpWx1aiJKYbmiOYeklOOHlc3FRok51sXRIImmtFcZYcNcyScwwHnaFg6jiZ kYu4xUrOgAUfmJjR80AkcRVO699BahXVpKLdSSLn+71whC9xHM5K/Bj+6cpl46iGm2GN lSgRsoItRd17bCi/MsMUqVuOiwjQP9YoOEm2cSn8z/Vf6god7iH+44mGIUPFgvDO75DZ dYqwe8Z6yIwxZQAOR3ZTN926a6iXKen8KDt77Wk1I7TBeZ1sTicRsckdaR00lMk8fnD3 WWDXV4Ui4QyCmmWG2oviwTzwVGTwROMa9WWwrL9sBwZzlAFpeHnNb2tNHFUKBkfzLWLw 7hFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xJZFwAgA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a6si24786949plh.349.2021.10.18.06.39.42; Mon, 18 Oct 2021 06:39:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xJZFwAgA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233490AbhJRNkj (ORCPT + 99 others); Mon, 18 Oct 2021 09:40:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:56164 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233637AbhJRNid (ORCPT ); Mon, 18 Oct 2021 09:38:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 40D94610E8; Mon, 18 Oct 2021 13:32:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634563927; bh=OJJ5bTMNlhWBksduviIDVeHHZl0uEw45tI5803glFK8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xJZFwAgAvTpxKwH4avk2GLJxUqE7XRNsRKFnyu7eZcCd5KwWXSZtIbo9hQjoYEEUd bnfXKU5UQNzu+PsnhSoSd7Z7SYlHlmerkZslOMks5BLLFl0eXtMA4IsodiTolCTlil xIIF3vbKBBOmkDI7lcTgy9vDyXJosIS+Ac5Ht3g4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shannon Nelson , "David S. Miller" Subject: [PATCH 5.4 69/69] ionic: dont remove netdev->dev_addr when syncing uc list Date: Mon, 18 Oct 2021 15:25:07 +0200 Message-Id: <20211018132331.767350432@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211018132329.453964125@linuxfoundation.org> References: <20211018132329.453964125@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shannon Nelson commit 5c976a56570f29aaf4a2f9a1bf99789c252183c9 upstream. Bridging, and possibly other upper stack gizmos, adds the lower device's netdev->dev_addr to its own uc list, and then requests it be deleted when the upper bridge device is removed. This delete request also happens with the bridging vlan_filtering is enabled and then disabled. Bonding has a similar behavior with the uc list, but since it also uses set_mac to manage netdev->dev_addr, it doesn't have the same the failure case. Because we store our netdev->dev_addr in our uc list, we need to ignore the delete request from dev_uc_sync so as to not lose the address and all hope of communicating. Note that ndo_set_mac_address is expressly changing netdev->dev_addr, so no limitation is set there. Fixes: 2a654540be10 ("ionic: Add Rx filter and rx_mode ndo support") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -912,6 +912,10 @@ static int ionic_addr_add(struct net_dev static int ionic_addr_del(struct net_device *netdev, const u8 *addr) { + /* Don't delete our own address from the uc list */ + if (ether_addr_equal(addr, netdev->dev_addr)) + return 0; + return ionic_lif_addr(netdev_priv(netdev), addr, false); }