Message ID | 20170719070232.28457-17-jiri@resnulli.us |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
On 7/19/17 1:02 AM, Jiri Pirko wrote: > From: Ido Schimmel <idosch@mellanox.com> > > Without resorting to ACLs, the device performs route lookup solely based > on the destination IP address. > > In case source-specific routing is needed, an error is returned and the > abort mechanism is activated, thus allowing the kernel to take over > forwarding decisions. > > Instead of aborting, we can trap specific destination prefixes where > source-specific routes are present, but this will result in a lot more > code that is unlikely to ever be used. Do you have a document summarizing these for users?
On Wed, Jul 19, 2017 at 10:16:19AM -0600, David Ahern wrote: > On 7/19/17 1:02 AM, Jiri Pirko wrote: > > From: Ido Schimmel <idosch@mellanox.com> > > > > Without resorting to ACLs, the device performs route lookup solely based > > on the destination IP address. > > > > In case source-specific routing is needed, an error is returned and the > > abort mechanism is activated, thus allowing the kernel to take over > > forwarding decisions. > > > > Instead of aborting, we can trap specific destination prefixes where > > source-specific routes are present, but this will result in a lot more > > code that is unlikely to ever be used. > > Do you have a document summarizing these for users? As you know, we've a Wiki we maintain for the features covered by mlxsw. Once these patches are applied to net-next I intend to extend it with IPv6 documentation and mention the above there. I did a similar thing with inter-VRF routes: https://github.com/Mellanox/mlxsw/wiki/Virtual-Routing-and-Forwarding-(VRF)#inter-vrf-routing
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index c56c700..33cb6b6 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -3429,6 +3429,9 @@ static int mlxsw_sp_router_fib6_add(struct mlxsw_sp *mlxsw_sp, if (mlxsw_sp->router->aborted) return 0; + if (rt->rt6i_src.plen) + return -EINVAL; + if (mlxsw_sp_fib6_rt_should_ignore(rt)) return 0;