Skip to contentSkip to conversation

batman-adv: Fix netlink dumping of all mcast_flags buckets

PATCH New Sven Eckelmann 1 participant 1 message Jul 7, 2019 Batman advanced

lore
Share & tools
lore

Sven Eckelmann

author maintainer
#0 lore raw

PATCH 1/1 batman-adv: Fix netlink dumping of all mcast_flags buckets

The bucket variable is only updated outside the loop over the mcast_flags buckets. It will only be updated during a dumping run when the dumping has to be interrupted and a new message has to be started.

This could result in repeated or missing entries when the multicast flags are dumped to userspace.

Fixes 06c82b7b15b1 ("batman-adv: Add inconsistent multicast netlink dump detection")
---
 net/batman-adv/multicast.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/batman-adv/multicast.c +1 -1
index 67d7f830..a3488cfb 100644
@@ -2303,7 +2303,7 @@ __batadv_mcast_flags_dump(struct sk_buff *msg, u32 portid,
 
 	while (bucket_tmp < hash->size) {
 		if (batadv_mcast_flags_dump_bucket(msg, portid, cb, hash,
-						   *bucket, &idx_tmp))
+						   bucket_tmp, &idx_tmp))
 			break;
 
 		bucket_tmp++;
Signature · 1 line
2.20.1