Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3040782pxb; Mon, 18 Oct 2021 07:08:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7OhNfbAqHq5/UsgnjIBLttr/D8pqPRURBr5FJ8dDU78j8UbL4x6PtagtGyOiUUQPaLgWk X-Received: by 2002:aa7:9844:0:b0:44c:ce0a:f736 with SMTP id n4-20020aa79844000000b0044cce0af736mr28636714pfq.1.1634566086707; Mon, 18 Oct 2021 07:08:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634566086; cv=none; d=google.com; s=arc-20160816; b=kYxqesXnzVdARqOJx1rGsVeuAUpEDqs9OsxpBarhKCPZirkPws72g0ikf/ZPykwqWr SGVzpwCh+fIIhESem4X1LCFipOfW4X/qxUHD6I/vqBIeOJclHUCeOrCxdzcXPZh8FbwM /6EZj3pjPIIS2yVl0oaR0iFuJOUUkVDDYumGvv8Eb12m423dMxjI+frUZkRzHX4G8Sf9 zUg+hRM7YIGuxHkjV2FzpmmXkEz0qNnmFm0E9cTSleHTQScP1bdooqCZDFCD6Ak3gyh/ M07of4eQMD8pg7CZ7xsLdaDqVi40bcOVlzWaFPytJrX0DU/xP1A5M/KrHN4PLF3l5HlE hyOg== 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=9azIqU33Yn1/iL2jUXWQl6zCooxEIo3yn52vPBzwLvI=; b=oHdYmIJvwwY0Eivu3Un8xDNk3D90M/+yAhiN/6Q4pvof+z1K0rZ//Grul2QJZR1ryu 7v0ppt0j3zU3vc85Q4AcauO5M5MdFGKY/fw1Zopt8b22w+z6B3ls+Jy5MzxbjkO+VF0d m+1xCoSnuQraCbHm3YTKGQftKbe90ZiEeCvriCLT5zVHBPCwNslppU0masrW4werVRG+ SycmPsFiW7YnsYcVxHVlUOg4PSvr+yCn2Y6W21bxuK0E0gGe4Xa+0IzFWO98aQZaQVxe OnmmuuCYJ7o2dkscNP0kixqblvc21RvYzbjnaztw5IGxjzdBG4SjjznYKLnhpa7l9mpO WUPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jIcavwUj; 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 bc12si18812235plb.114.2021.10.18.07.07.53; Mon, 18 Oct 2021 07:08:06 -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=jIcavwUj; 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 S234554AbhJROGP (ORCPT + 99 others); Mon, 18 Oct 2021 10:06:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:39032 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234791AbhJROC4 (ORCPT ); Mon, 18 Oct 2021 10:02:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F13BE61528; Mon, 18 Oct 2021 13:43:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634564600; bh=AgX+EiQDbW4aI/vscvozxBVzAXEqnYe8BPDY9tG2feM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jIcavwUj8Hgi4jICGoX3hor2k5Si6MGJaLuRJtkwLqM+G0G3O+dbqTovQ7Ag/xYQ4 1CthUswwOSKd2bTLwpFB4NDMNAeByIO7ExMOxytXepKpskAD8B4YNYWqtaeRdKhRXC m1A1Jy1IXME45qeGYjFjhRLLEXqMM0ElJdGi/khU= 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.14 151/151] ionic: dont remove netdev->dev_addr when syncing uc list Date: Mon, 18 Oct 2021 15:25:30 +0200 Message-Id: <20211018132345.570450849@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211018132340.682786018@linuxfoundation.org> References: <20211018132340.682786018@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 @@ -1357,6 +1357,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, DEL_ADDR); }