]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: bridge: use nla_total_size_64bit() in br_get_linkxstats_size()
authorEric Dumazet <edumazet@google.com>
Tue, 5 Oct 2021 01:05:07 +0000 (18:05 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Oct 2021 11:39:07 +0000 (12:39 +0100)
bridge_fill_linkxstats() is using nla_reserve_64bit().

We must use nla_total_size_64bit() instead of nla_total_size()
for corresponding data structure.

Fixes: 6774caed7674 ("net: bridge: add support for IGMP/MLD stats and export them via netlink")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Nikolay Aleksandrov <nikolay@nvidia.com>
Cc: Vivien Didelot <vivien.didelot@gmail.com>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_netlink.c

index 6c58fc14d2cb2de8bcd8364fc5e766247aba2e97..29b8f6373fb925d48ce876dcda7fccc10539240a 100644 (file)
@@ -1666,7 +1666,7 @@ static size_t br_get_linkxstats_size(const struct net_device *dev, int attr)
        }
 
        return numvls * nla_total_size(sizeof(struct bridge_vlan_xstats)) +
-              nla_total_size(sizeof(struct br_mcast_stats)) +
+              nla_total_size_64bit(sizeof(struct br_mcast_stats)) +
               nla_total_size(0);
 }