Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3024020pxb; Mon, 18 Oct 2021 06:49:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzo23m6rdGKkIE5k0ygm1WzfbQFeVmA9x9Y4RBPa2ChG6xvHZvUaIL/3Yj0v6Ivz9CVt/PB X-Received: by 2002:a17:90a:7d11:: with SMTP id g17mr33155165pjl.19.1634564962511; Mon, 18 Oct 2021 06:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634564962; cv=none; d=google.com; s=arc-20160816; b=NyxIRpRMNAxODS2wYgvOci1gT8ggtTDD0triiFJOksdIhsMD/HvCgTql1LbqZsS05q 1F9XVBa4VMPigiuqhbhM0gVLYUkNRsCuH9FO/RkF12M446wCaGnQ5Bm0C4W6CBVUhdfQ fr6EUJjByBmudWiuJNpVDRppswm6o69BCRelGZtlsgfXvbdYeee8NyaZ0QTPEXxuJNN+ m8zgTZ01FEaOK7iKgVDs5ciuI3uqo07lmPpdPdWlX1vX1o+aEmIqO7b6J2paf9axSv0m j8eIg52d/IOtXWr9XICiSZStdxX3/Uk8OGNKBkGNoKu7j4ZnqqtYdQMLFMPkeZfouL7U +vmg== 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=LioQvv+pAw1n9HWXbojgrvNVWYJlMZCnjdhNHLM/HJs=; b=cxSA1yywMGQfQvkO7I9No5MQokHykZ0GCjp0by9w1+znTssrcS3VRcfHZo/nT0nnFf BzP57Do0fPv2e15Dq8H4wozZWLOdKgJhCp1J1YHDDDqEDWHugONKe7tJf+5hJYAFNqhv try6SI9VPTVlgKaqs+b4o2n7KWJciE76DdKNB32YlcJarDnNIywoPIb1mLzeguBTekOM YWyHCbckead6Aw9J3bVjzzamFpNKNf00wT04zQ6eCTH9uxApjMoJorIrMIyK1TcidutH vZ1TEah8WQBrlMCZVWFYMjDkwneoHQmBbfb5D5OooPtCjcvyGK8CiZH44pBqD8RIhsLj f5mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cPy6p3bT; 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 b5si11099093pls.256.2021.10.18.06.49.04; Mon, 18 Oct 2021 06:49:22 -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=cPy6p3bT; 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 S233736AbhJRNtp (ORCPT + 99 others); Mon, 18 Oct 2021 09:49:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:49874 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233654AbhJRNrv (ORCPT ); Mon, 18 Oct 2021 09:47:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9A22D61423; Mon, 18 Oct 2021 13:36:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634564199; bh=xObCNyfg+Ol338oOCcs/K/4YRaGP0X8KleMFGcNazAg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cPy6p3bThOuDAZZ34UMp6sbj1i2deCgoC1xEyRxj28BZvEwbxe0mFo1KUtFaiSJjM XRt4pSr2nJWiMUo3zELySwoQCFkFYJqdhHDrygr8H1y1nnsJyrQacaaaOuJwJbITUO P3UmsOiLSsvLlBEvKO3y5T6O7fQevoeg4wOqlyyw= 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.10 102/103] ionic: dont remove netdev->dev_addr when syncing uc list Date: Mon, 18 Oct 2021 15:25:18 +0200 Message-Id: <20211018132338.173418397@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211018132334.702559133@linuxfoundation.org> References: <20211018132334.702559133@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 @@ -1096,6 +1096,10 @@ static int ionic_ndo_addr_add(struct net 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, true); }