Skip to content

Commit 06aaf04

Browse files
ffmancerakuba-moo
authored andcommitted
ipv4: nexthop: avoid duplicate NHA_HW_STATS_ENABLE on nexthop group dump
Currently NHA_HW_STATS_ENABLE is included twice everytime a dump of nexthop group is performed with NHA_OP_FLAG_DUMP_STATS. As all the stats querying were moved to nla_put_nh_group_stats(), leave only that instance of the attribute querying. Fixes: 5072ae0 ("net: nexthop: Expose nexthop group HW stats to user space") Signed-off-by: Fernando Fernandez Mancera <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b76254c commit 06aaf04

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

net/ipv4/nexthop.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,8 +902,7 @@ static int nla_put_nh_group(struct sk_buff *skb, struct nexthop *nh,
902902
goto nla_put_failure;
903903

904904
if (op_flags & NHA_OP_FLAG_DUMP_STATS &&
905-
(nla_put_u32(skb, NHA_HW_STATS_ENABLE, nhg->hw_stats) ||
906-
nla_put_nh_group_stats(skb, nh, op_flags)))
905+
nla_put_nh_group_stats(skb, nh, op_flags))
907906
goto nla_put_failure;
908907

909908
return 0;

0 commit comments

Comments
 (0)