diff options
author | David Ahern <dsahern@gmail.com> | 2019-06-03 20:19:53 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-04 19:26:50 -0700 |
commit | 54250805d8e436d46ca391219802f2a23b948e8d (patch) | |
tree | b260cd214354eebd174070625f947e2c4d0f73ef /drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | |
parent | ipv6: Plumb support for nexthop object in a fib6_info (diff) | |
download | linux-dev-54250805d8e436d46ca391219802f2a23b948e8d.tar.xz linux-dev-54250805d8e436d46ca391219802f2a23b948e8d.zip |
mlxsw: Fail attempts to use routes with nexthop objects
Fail attempts to use nexthop objects with routes until support can be
properly added.
Signed-off-by: David Ahern <dsahern@gmail.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index 4f781358aef1..23f17ea52061 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -6122,6 +6122,20 @@ static int mlxsw_sp_router_fib_event(struct notifier_block *nb, NL_SET_ERR_MSG_MOD(info->extack, "IPv6 gateway with IPv4 route is not supported"); return notifier_from_errno(-EINVAL); } + if (fen_info->fi->nh) { + NL_SET_ERR_MSG_MOD(info->extack, "IPv4 route with nexthop objects is not supported"); + return notifier_from_errno(-EINVAL); + } + } else if (info->family == AF_INET6) { + struct fib6_entry_notifier_info *fen6_info; + + fen6_info = container_of(info, + struct fib6_entry_notifier_info, + info); + if (fen6_info->rt->nh) { + NL_SET_ERR_MSG_MOD(info->extack, "IPv6 route with nexthop objects is not supported"); + return notifier_from_errno(-EINVAL); + } } break; } |