Re: [PATCH net-next v3 2/3] ipv6: return EMSGSIZE when first route in dump does not fit
From: David Ahern
Date: Thu Nov 19 2026 - 10:51:24 EST
On 11/17/26 4:13 PM, 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>
> ---
> net/ipv6/ip6_fib.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
Reviewed-by: David Ahern <dsahern@xxxxxxxxxx>