aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_multicast.c
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@nvidia.com>2021-08-16 13:11:34 +0300
committerDavid S. Miller <davem@davemloft.net>2021-08-16 13:58:00 +0100
commit175e66924719090f3f43884a419e7c32dabb800f (patch)
treeb33988ac3eaeb7ba5532276a7c7f63b875651ad7 /net/bridge/br_multicast.c
parentnet: bridge: mcast: drop sizeof for nest attribute's zero size (diff)
downloadlinux-dev-175e66924719090f3f43884a419e7c32dabb800f.tar.xz
linux-dev-175e66924719090f3f43884a419e7c32dabb800f.zip
net: bridge: mcast: account for ipv6 size when dumping querier state
We need to account for the IPv6 attributes when dumping querier state. Fixes: 5e924fe6ccfd ("net: bridge: mcast: dump ipv6 querier state") Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/bridge/br_multicast.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 76992ddac7e0..e411dd814c58 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -2931,7 +2931,13 @@ size_t br_multicast_querier_state_size(void)
return nla_total_size(0) + /* nest attribute */
nla_total_size(sizeof(__be32)) + /* BRIDGE_QUERIER_IP_ADDRESS */
nla_total_size(sizeof(int)) + /* BRIDGE_QUERIER_IP_PORT */
- nla_total_size_64bit(sizeof(u64)); /* BRIDGE_QUERIER_IP_OTHER_TIMER */
+ nla_total_size_64bit(sizeof(u64)) + /* BRIDGE_QUERIER_IP_OTHER_TIMER */
+#if IS_ENABLED(CONFIG_IPV6)
+ nla_total_size(sizeof(struct in6_addr)) + /* BRIDGE_QUERIER_IPV6_ADDRESS */
+ nla_total_size(sizeof(int)) + /* BRIDGE_QUERIER_IPV6_PORT */
+ nla_total_size_64bit(sizeof(u64)) + /* BRIDGE_QUERIER_IPV6_OTHER_TIMER */
+#endif
+ 0;
}
/* protected by rtnl or rcu */