From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH net-next 2/9] net/ipv4: Plumb support for filtering route dumps Date: Thu, 11 Oct 2018 20:30:16 +0200 Message-ID: <20181011183016.GH5708@lunn.ch> References: <20181011150627.4010-1-dsahern@kernel.org> <20181011150627.4010-3-dsahern@kernel.org> <20181011155630.GG5708@lunn.ch> <216764dd-a882-9788-c2d7-54f0e69be3df@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Ahern , netdev@vger.kernel.org, davem@davemloft.net To: David Ahern Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:60372 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728762AbeJLB6n (ORCPT ); Thu, 11 Oct 2018 21:58:43 -0400 Content-Disposition: inline In-Reply-To: <216764dd-a882-9788-c2d7-54f0e69be3df@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, Oct 11, 2018 at 10:44:04AM -0600, David Ahern wrote: > On 10/11/18 9:56 AM, Andrew Lunn wrote: > >> @@ -866,10 +866,13 @@ static int inet_dump_fib(struct sk_buff *skb, struct netlink_callback *cb) > >> hlist_for_each_entry_rcu(tb, head, tb_hlist) { > >> if (e < s_e) > >> goto next; > >> + if (filter.table_id && filter.table_id != tb->tb_id) > >> + goto next; > >> + > > > > Hi David > > > > Should there be a test here that filter->filter_set is set, before > > looking at filter.table_id. > > filter_set is meant for places that would need to look at multiple flags. Hi David It would be good to add some comments to struct fib_dump_filter. Maybe also move table_id before filter_set, to try to indicate it is not relevant for the table_id. Andrew