Subject: Re: [PATCH net] fib_semantics: Don't match route with mismatching tclassid

From: Stefano Brivio <[email-masked]>
Date: Wed, 14 Feb 2018 19:06:37 +0100

Hi David,

On Wed, 14 Feb 2018 10:46:05 -0700
David Ahern <[email-masked]> wrote:

> On 2/14/18 10:28 AM, Stefano Brivio wrote:
>
> > +#ifdef CONFIG_IP_ROUTE_CLASSID
> > +		if (cfg->fc_flow != fi->fib_nh->nh_tclassid)
> > +			return 1;
> > +#endif  
> 
> you should verify fc_flow is set. user is allowed to delete first
> matching route based on data that is given.

Thanks for your comment.

My intended semantic was different, that is, I assumed that if fc_flow
is not set (zero, here), the user shouldn't be able to just delete the
first matching route. But I guess your interpretation makes more sense
because it's consistent with the other checks. I'll send a v2.

-- 
Stefano