afc9db1bf101ea67ee69acebab35e412c946a4ee
[feed/routing.git] / batman-adv / patches / 0006-batman-adv-Fix-netlink-dumping-of-all-mcast_flags-bu.patch
1 From: Sven Eckelmann <sven@narfation.org>
2 Date: Sun, 7 Jul 2019 22:19:22 +0200
3 Subject: batman-adv: Fix netlink dumping of all mcast_flags buckets
4
5 The bucket variable is only updated outside the loop over the mcast_flags
6 buckets. It will only be updated during a dumping run when the dumping has
7 to be interrupted and a new message has to be started.
8
9 This could result in repeated or missing entries when the multicast flags
10 are dumped to userspace.
11
12 Fixes: 06c82b7b15b1 ("batman-adv: Add inconsistent multicast netlink dump detection")
13 Signed-off-by: Sven Eckelmann <sven@narfation.org>
14
15 Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/d1de7f7aa316d6f7b3268f61afa88f5d2c1a5db5
16
17 diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
18 index ec54e236e345432496df8f55b2e00fbad92f3444..50fe9dfb088b60a911756c8c22cac1db6ef10ca4 100644
19 --- a/net/batman-adv/multicast.c
20 +++ b/net/batman-adv/multicast.c
21 @@ -1653,7 +1653,7 @@ __batadv_mcast_flags_dump(struct sk_buff *msg, u32 portid,
22
23 while (bucket_tmp < hash->size) {
24 if (batadv_mcast_flags_dump_bucket(msg, portid, cb, hash,
25 - *bucket, &idx_tmp))
26 + bucket_tmp, &idx_tmp))
27 break;
28
29 bucket_tmp++;