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

Reply via email to