]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
batman-adv: Fix netlink dumping of all mcast_flags buckets
authorSven Eckelmann <sven@narfation.org>
Sun, 7 Jul 2019 20:15:13 +0000 (22:15 +0200)
committerSimon Wunderlich <sw@simonwunderlich.de>
Mon, 22 Jul 2019 19:34:58 +0000 (21:34 +0200)
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: d2d489b7d851 ("batman-adv: Add inconsistent multicast netlink dump detection")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/multicast.c

index 67d7f83009ae1e0c1fc8e9e694d3d33a9f93d7d5..a3488cfb3d1eef7e4bde5c09ac565d6b93a6d49e 100644 (file)
@@ -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++;