batman-adv: Merge bugfixes from 2019.3 496/head
authorSven Eckelmann <sven@narfation.org>
Thu, 1 Aug 2019 17:24:32 +0000 (19:24 +0200)
committerSven Eckelmann <sven@narfation.org>
Thu, 1 Aug 2019 17:47:11 +0000 (19:47 +0200)
* Fix netlink dumping of all mcast_flags buckets

Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv/Makefile
batman-adv/patches/0006-batman-adv-Fix-netlink-dumping-of-all-mcast_flags-bu.patch [new file with mode: 0644]

index b84475a43ad7b149dbbceee575649f1b74a549f0..a7c6a795b4610a722741ece87e36a2ac373901e1 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=batman-adv
 
 PKG_VERSION:=2019.2
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 PKG_HASH:=70c3f6a6cf88d2b25681a76768a52ed92d9fe992ba8e358368b6a8088757adc8
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/batman-adv/patches/0006-batman-adv-Fix-netlink-dumping-of-all-mcast_flags-bu.patch b/batman-adv/patches/0006-batman-adv-Fix-netlink-dumping-of-all-mcast_flags-bu.patch
new file mode 100644 (file)
index 0000000..afc9db1
--- /dev/null
@@ -0,0 +1,29 @@
+From: Sven Eckelmann <sven@narfation.org>
+Date: Sun, 7 Jul 2019 22:19:22 +0200
+Subject: 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: 06c82b7b15b1 ("batman-adv: Add inconsistent multicast netlink dump detection")
+Signed-off-by: Sven Eckelmann <sven@narfation.org>
+
+Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/d1de7f7aa316d6f7b3268f61afa88f5d2c1a5db5
+
+diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
+index ec54e236e345432496df8f55b2e00fbad92f3444..50fe9dfb088b60a911756c8c22cac1db6ef10ca4 100644
+--- a/net/batman-adv/multicast.c
++++ b/net/batman-adv/multicast.c
+@@ -1653,7 +1653,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++;