Re: [PATCH net v2 2/3] ipv6: return EMSGSIZE when first route in dump does not fit

From: Ido Schimmel

Date: Thu Nov 12 2026 - 10:38:06 EST


On Tue, Nov 10, 2026 at 09:26:17AM -0800, Stephen Hemminger wrote:
> If a route does not fit in an empty dump skb, fib6_dump_node()
> suspends the walker and inet6_dump_fib() returns 1. rtnl_dumpit()
> then returns skb->len, which is 0, and the dump ends with NLMSG_DONE
> and status 0, silently dropping the route and those after it.
>
> This became reachable when multipath routes started being dumped as a
> single message with an RTA_MULTIPATH attribute; a wide enough route no
> longer fits.
>
> Return -EMSGSIZE in this case, as IPv4 does. This depends on the
> rtnl_dumpit() fix in the previous patch.
>
> Fixes: beb1afac518d ("net: ipv6: Add support to dump multipath routes via RTA_MULTIPATH attribute")
> Signed-off-by: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>

Reviewed-by: Ido Schimmel <idosch@xxxxxxxxxx>

FWIW, given that "It takes some non real world stuff to do this", I
think these patches can be routed via net-next.