]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: ipmr: fix unresolved entry dumps
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Wed, 17 Oct 2018 19:34:34 +0000 (22:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Oct 2018 05:35:42 +0000 (22:35 -0700)
If the skb space ends in an unresolved entry while dumping we'll miss
some unresolved entries. The reason is due to zeroing the entry counter
between dumping resolved and unresolved mfc entries. We should just
keep counting until the whole table is dumped and zero when we move to
the next as we have a separate table counter.

Reported-by: Colin Ian King <colin.king@canonical.com>
Fixes: e7dce7c1df15 ("ipmr: improve hash scalability")
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipmr_base.c

index 1ad9aa62a97b28e2f30c6d63bbad2afb34385a0c..eab8cd5ec2f5dd2b0257339977f9095c8cf25a63 100644 (file)
@@ -296,8 +296,6 @@ int mr_rtm_dumproute(struct sk_buff *skb, struct netlink_callback *cb,
 next_entry:
                        e++;
                }
-               e = 0;
-               s_e = 0;
 
                spin_lock_bh(lock);
                list_for_each_entry(mfc, &mrt->mfc_unres_queue, list) {