]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Relax FIB rule validation
authorIdo Schimmel <idosch@mellanox.com>
Sun, 21 Apr 2019 07:18:36 +0000 (07:18 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 Apr 2019 17:31:45 +0000 (10:31 -0700)
commit42032aeb7f7d1ceeb6dbd79bcb7195a6ec1ac027
treec00367b93819d0e100bced7dc5d759c59027a9d4
parent33a24e0cf1641f53b3c87828cf0fbcabcf790b80
mlxsw: spectrum_router: Relax FIB rule validation

Currently, mlxsw does not support policy-based routing (PBR) and
therefore forbids the installation of non-default FIB rules except for
the l3mdev rule which is used for VRFs.

Relax the check to allow the installation of FIB rules that would never
match packets received by the device. Specifically, if the iif is that
of the loopback netdev. This is useful for users that need to redirect
locally generated packets based on FIB rules.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Tested-by: Alexander Petrovskiy <alexpe@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c