From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio Subject: Re: [PATCH net] fib_semantics: Don't match route with mismatching tclassid Date: Wed, 14 Feb 2018 19:06:37 +0100 Message-ID: <20180214190637.428c19a5@epycfail> References: <20180214172822.25952-1-sbrivio@redhat.com> <0b984dc9-1206-552f-80e4-66bac17c3ab1@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "David S . Miller" , Alexey Kuznetsov , Thomas Graf , Jianlin Shi , netdev@vger.kernel.org To: David Ahern Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:58480 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1161585AbeBNSGx (ORCPT ); Wed, 14 Feb 2018 13:06:53 -0500 In-Reply-To: <0b984dc9-1206-552f-80e4-66bac17c3ab1@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: Hi David, On Wed, 14 Feb 2018 10:46:05 -0700 David Ahern 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