diff options
| author | Miaohe Lin <linmiaohe@huawei.com> | 2019-04-20 12:09:39 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-16 19:40:26 +0200 |
| commit | fb53ebc9eb9a889b0db66d00932d31e3c7ad49b4 (patch) | |
| tree | 85d5898efa4c93ced918958b285b93b77f2eb450 | |
| parent | ec69b3c91b3bc83e5bdc70c846358e4fbb30c321 (diff) | |
| download | linux-fb53ebc9eb9a889b0db66d00932d31e3c7ad49b4.tar.gz linux-fb53ebc9eb9a889b0db66d00932d31e3c7ad49b4.tar.bz2 linux-fb53ebc9eb9a889b0db66d00932d31e3c7ad49b4.zip | |
net: vrf: Fix operation not supported when set vrf mac
[ 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 <wanghui104@huawei.com>
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | drivers/net/vrf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index cd15c32b2e43..9ee4d7402ca2 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 |
