net: ipv4: Fix rtnexthop len when RTA_FLOW is present
Multipath RTA_FLOW is embedded in nexthop. Dump it in fib_add_nexthop()
to get the length of rtnexthop correct.
Fixes: b0f6019363 ("ipv4: Refactor nexthop attributes in fib_dump_info")
Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
325fd36ae7
commit
597aa16c78
@@ -5681,14 +5681,15 @@ static int rt6_fill_node(struct net *net, struct sk_buff *skb,
|
||||
goto nla_put_failure;
|
||||
|
||||
if (fib_add_nexthop(skb, &rt->fib6_nh->nh_common,
|
||||
rt->fib6_nh->fib_nh_weight, AF_INET6) < 0)
|
||||
rt->fib6_nh->fib_nh_weight, AF_INET6,
|
||||
0) < 0)
|
||||
goto nla_put_failure;
|
||||
|
||||
list_for_each_entry_safe(sibling, next_sibling,
|
||||
&rt->fib6_siblings, fib6_siblings) {
|
||||
if (fib_add_nexthop(skb, &sibling->fib6_nh->nh_common,
|
||||
sibling->fib6_nh->fib_nh_weight,
|
||||
AF_INET6) < 0)
|
||||
AF_INET6, 0) < 0)
|
||||
goto nla_put_failure;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user