]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.0/mlxsw-spectrum_router-do-not-check-vrf-mac-address.patch
5.0-stable patches
[thirdparty/kernel/stable-queue.git] / queue-5.0 / mlxsw-spectrum_router-do-not-check-vrf-mac-address.patch
1 From foo@baz Sat Apr 20 16:43:09 CEST 2019
2 From: Ido Schimmel <idosch@mellanox.com>
3 Date: Wed, 10 Apr 2019 06:58:15 +0000
4 Subject: mlxsw: spectrum_router: Do not check VRF MAC address
5
6 From: Ido Schimmel <idosch@mellanox.com>
7
8 [ Upstream commit 972fae683cbad5cf348268e76abc6d55cfb3ba87 ]
9
10 Commit 74bc99397438 ("mlxsw: spectrum_router: Veto unsupported RIF MAC
11 addresses") enabled the driver to veto router interface (RIF) MAC
12 addresses that it cannot support.
13
14 This check should only be performed for interfaces for which the driver
15 actually configures a RIF. A VRF upper is not one of them, so ignore it.
16
17 Without this patch it is not possible to set an IP address on the VRF
18 device and use it as a loopback.
19
20 Fixes: 74bc99397438 ("mlxsw: spectrum_router: Veto unsupported RIF MAC addresses")
21 Signed-off-by: Ido Schimmel <idosch@mellanox.com>
22 Reported-by: Alexander Petrovskiy <alexpe@mellanox.com>
23 Tested-by: Alexander Petrovskiy <alexpe@mellanox.com>
24 Acked-by: Jiri Pirko <jiri@mellanox.com>
25 Signed-off-by: David S. Miller <davem@davemloft.net>
26 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27 ---
28 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 +-
29 1 file changed, 1 insertion(+), 1 deletion(-)
30
31 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
32 +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
33 @@ -6745,7 +6745,7 @@ static int mlxsw_sp_router_port_check_ri
34 /* A RIF is not created for macvlan netdevs. Their MAC is used to
35 * populate the FDB
36 */
37 - if (netif_is_macvlan(dev))
38 + if (netif_is_macvlan(dev) || netif_is_l3_master(dev))
39 return 0;
40
41 for (i = 0; i < MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS); i++) {