Skip to content

Commit

Permalink
batman-adv: Fix netlink dumping of all mcast_flags buckets
Browse files Browse the repository at this point in the history
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: d2d489b ("batman-adv: Add inconsistent multicast netlink dump detection")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
  • Loading branch information
Sven Eckelmann authored and Simon Wunderlich committed Jul 22, 2019
1 parent 5f9e832 commit fa3a03d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/batman-adv/multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit fa3a03d

Please sign in to comment.