On 6/9/25 19:05, Petr Machata wrote:
ipstats_stat_desc_show_xstats() operates by first parsing the attribute
stream into a type-indexed table, and then accessing the right attribute.
But bridge VLAN stats are given as several BRIDGE_XSTATS_VLAN attributes,
one per VLAN. With the above approach to parsing, only one of these
attributes would be shown. Instead, iterate the stream of attributes and
call the show_cb for each one with a matching type.
Signed-off-by: Petr Machata <[email protected]>
---
Notes:
v2:
- Use rtattr_for_each_nested
- Drop #include <alloca.h>, it's not used anymore
ip/ipstats.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
Acked-by: Nikolay Aleksandrov <[email protected]>