On Tue, 18 Jun 2019 09:19:53 -0600
David Ahern <[email protected]> wrote:
> On 6/18/19 7:20 AM, Stefano Brivio wrote:
> > diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> > index 0f60eb3a2873..7375f3b7d310 100644
> > --- a/net/ipv6/route.c
> > +++ b/net/ipv6/route.c
> > @@ -4854,33 +4854,94 @@ static bool fib6_info_uses_dev(const struct
> > fib6_info *f6i,
> > return false;
> > }
> >
> > -int rt6_dump_route(struct fib6_info *rt, void *p_arg)
> > +/* Return -1 if done with node, number of handled routes on partial dump */
> > +int rt6_dump_route(struct fib6_info *rt, void *p_arg, unsigned int skip)
>
> Changing the return code of rt6_dump_route should be a separate patch.
I guess the purpose would be to highlight how existing cases are
changed, but that looks rather trivial to me. Anyway, changed in v6.
> > + if (filter->dump_routes) {
> > + if (skip) {
> > + skip--;
> > + } else {
> > + if (rt6_fill_node(net, arg->skb, rt, NULL, NULL, NULL,
> > + 0, RTM_NEWROUTE,
> > + NETLINK_CB(arg->cb->skb).portid,
> > + arg->cb->nlh->nlmsg_seq, flags)) {
> > + return 0;
> > + }
> > + count++;
> > + }
> > + }
> > +
> > + if (!filter->dump_exceptions)
> > + return -1;
> > +
>
> And the dump of the exception bucket should be a standalone function.
> You will see why with net-next (it is per fib6_nh).
Sure, no way around it now, changed in v6.
--
Stefano