On Wed, Mar 15, 2017 at 09:22:10AM -0600, David Ahern wrote:
> On 3/15/17 5:05 AM, Jiri Pirko wrote:
> > @@ -2510,10 +2511,20 @@ static void mlxsw_sp_router_fib4_abort(struct
> > mlxsw_sp *mlxsw_sp)
> > dev_warn(mlxsw_sp->bus_info->dev, "Failed to set abort
> > trap.\n");
> > }
> >
> > +static bool mlxsw_sp_fib4_rule_default(const struct fib_rule *rule)
> > +{
> > + if (!fib4_rule_matchall(rule) || rule->action != FR_ACT_TO_TBL ||
> > + (rule->table != RT_TABLE_LOCAL && rule->table != RT_TABLE_MAIN &&
> > + rule->table != RT_TABLE_DEFAULT))
> > + return false;
> > + return true;
> > +}
> > +
>
> Since a default rule is defined by fib_default_rule_add(), and its
> callers, IPv4 and IPv6 should have the above as an exported helper.
OK. Will add this in IPv4 code. When we add support for IPv6 I'll do the
same there.
Thanks