Re: [B.A.T.M.A.N.] [PATCH 10/10] batman-adv: add B.A.T.M.A.N. Dump BLA claims via netlink

Sven Eckelmann
2016-04-29T21:07:37Z

[-- Attachment #1: Type: text/plain, Size: 593 bytes --]

On Thursday 28 April 2016 22:37:28 Andrew Lunn wrote:
> + hlist_for_each_entry_rcu(claim, head, hash_entry) {
> + if (idx++ < *idx_skip)
> + continue;
> + if (batadv_bla_claim_dump_entry(msg, portid, seq,
> + primary_if, claim))
> + *idx_skip = idx - 1;
> + goto unlock;
> + }

This is buggy and will always jump to unlock after the first entry. Please
enclose the "*idx_skip = idx - 1;" and "goto unlock;" with { ... }