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: d2d489b7d8 ("batman-adv: Add inconsistent multicast netlink dump detection")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
This commit is contained in:
Sven Eckelmann 2019-07-07 22:15:13 +02:00 committed by Simon Wunderlich
parent 5f9e832c13
commit fa3a03da54
1 changed files with 1 additions and 1 deletions

View File

@ -2303,7 +2303,7 @@ __batadv_mcast_flags_dump(struct sk_buff *msg, u32 portid,
while (bucket_tmp < hash->size) { while (bucket_tmp < hash->size) {
if (batadv_mcast_flags_dump_bucket(msg, portid, cb, hash, if (batadv_mcast_flags_dump_bucket(msg, portid, cb, hash,
*bucket, &idx_tmp)) bucket_tmp, &idx_tmp))
break; break;
bucket_tmp++; bucket_tmp++;