summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/multicast.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2019-07-07 22:15:13 +0200
committerSimon Wunderlich <sw@simonwunderlich.de>2019-07-22 21:34:58 +0200
commitfa3a03da549a889fc9dbc0d3c5908eb7882cac8f (patch)
tree409cfab147e65bf26f097eeea6c0fb4854c4284c /net/batman-adv/multicast.c
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b (diff)
downloadlinux-fa3a03da549a889fc9dbc0d3c5908eb7882cac8f.tar.gz
linux-fa3a03da549a889fc9dbc0d3c5908eb7882cac8f.tar.bz2
linux-fa3a03da549a889fc9dbc0d3c5908eb7882cac8f.zip
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: 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>
Diffstat (limited to 'net/batman-adv/multicast.c')
-rw-r--r--net/batman-adv/multicast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
index 67d7f83009ae..a3488cfb3d1e 100644
--- a/net/batman-adv/multicast.c
+++ b/net/batman-adv/multicast.c
@@ -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++;