Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp461391yba; Wed, 15 May 2019 04:31:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLccTQ/MNguTumYIu7e5zoMwPoYmuwtAgOu6e7q3Nn9Nbg+DFoEEaXYWCFSem7RYGfEUCF X-Received: by 2002:a63:5c1c:: with SMTP id q28mr43019345pgb.45.1557919893901; Wed, 15 May 2019 04:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557919893; cv=none; d=google.com; s=arc-20160816; b=vnSWG92zztnO2nvUcJ+JjhXOi+NeZchMkML5KjebkAxdyyi/hNZvWg5biWHnKHV44D 9u3xMYXcereUoJIZliwv1ywe5JcVhjtW00PeM0PjRk4R6/Tx3RcaKw4ZE3Wdvj6xt2a7 fPVWVapP+SRcYzkF0bLTIu01hTZEQe213MsRt+sOfslYvBGeKUzc+xHP6WSHuXnzkd1l WMMJGSQIzJAJcfQR3hC1Vt6sZzr7OTIjDekXFFPdw3++gkp30Txmt23R2DRkuJ2loe/c uKEFIvxuNKPnm37YZVMsVkz7u975e5RbmnOVTa8PI4okzEJ/1HNdjoEu73GVq8BJhFGB ehzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=51m2fl44KINsIpetIxjHVsdbLPYSTd9BJr2erLPh1dE=; b=p48nzVxbiXR9axx+JJUFe9jwkSBizLYpZEuoF8hKJCnfT9/IHpRI3vxznWLbsqfXBX Pl3je/41lQPOBZIjINUQXpIS4hu+DaAF3n6a9VWSGDGG8bKa4AFvmNtpAnW8L2QrQFQH lN4pUYNVWW3NULChm5Eql2KAOOrYIHKuaQBlziJSlwNtevBGWZFXK/al6RJnZM61aD+t cC3gCT7QgzXMyX23WnJBnFaTaAlPF9HMay+Cf6Wc0eGmn5S0GIVp0qKIZs/iddX/Hbeb dDIRrOtKBGMGPwUbWqDv0110m+ZpKuOTGdNQO/d/U8PDNUby/tnuuJ4qkfIMkkAPgOGt sN6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=07ZMUC7j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 133si1579016pga.130.2019.05.15.04.31.18; Wed, 15 May 2019 04:31:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=07ZMUC7j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732611AbfEOL3n (ORCPT + 99 others); Wed, 15 May 2019 07:29:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:41058 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729916AbfEOL3m (ORCPT ); Wed, 15 May 2019 07:29:42 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AE0682089E; Wed, 15 May 2019 11:29:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557919781; bh=2uV+ZTq8AYn4p8wD8+jiKUpcpJBue73+IgwNqmd6hDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=07ZMUC7jZ0ftvvJDXKj6S5HO/UbcAhsFvLiTXlT2kNrYt01FctPIKErSynuChNyzi Qajyg6FcY4okg2JRqVGhO+/dEylrqSIVvYfF3memaSlH3kSRZdfsHhuSyMlTuKSuqi QcO/mro6ZEA87D/MrE2Z42g6SWgP0L61+NB4Oh+E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hui Wang , Miaohe Lin , "David S. Miller" , Sasha Levin Subject: [PATCH 5.0 092/137] net: vrf: Fix operation not supported when set vrf mac Date: Wed, 15 May 2019 12:56:13 +0200 Message-Id: <20190515090700.221301019@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190515090651.633556783@linuxfoundation.org> References: <20190515090651.633556783@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 6819e3f6d83a24777813b0d031ebe0861694db5a ] Vrf device is not able to change mac address now because lack of ndo_set_mac_address. Complete this in case some apps need to do this. Reported-by: Hui Wang Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/vrf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index cd15c32b2e436..9ee4d7402ca23 100644 --- a/drivers/net/vrf.c +++ b/drivers/net/vrf.c @@ -875,6 +875,7 @@ static const struct net_device_ops vrf_netdev_ops = { .ndo_init = vrf_dev_init, .ndo_uninit = vrf_dev_uninit, .ndo_start_xmit = vrf_xmit, + .ndo_set_mac_address = eth_mac_addr, .ndo_get_stats64 = vrf_get_stats64, .ndo_add_slave = vrf_add_slave, .ndo_del_slave = vrf_del_slave, @@ -1274,6 +1275,7 @@ static void vrf_setup(struct net_device *dev) /* default to no qdisc; user can add if desired */ dev->priv_flags |= IFF_NO_QUEUE; dev->priv_flags |= IFF_NO_RX_HANDLER; + dev->priv_flags |= IFF_LIVE_ADDR_CHANGE; /* VRF devices do not care about MTU, but if the MTU is set * too low then the ipv4 and ipv6 protocols are disabled -- 2.20.1