Commit 5add189a authored by Jozsef Kadlecsik's avatar Jozsef Kadlecsik Committed by Pablo Neira Ayuso

netfilter: ipset: bitmap:ip,mac: fix listing with timeout

The type when timeout support was enabled, could not list all elements,
just the first ones which could fit into one netlink message: it just
did not continue listing after the first message.
Reported-by: default avatarYoann JUET <yoann.juet@univ-nantes.fr>
Signed-off-by: default avatarJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Tested-by: default avatarYoann JUET <yoann.juet@univ-nantes.fr>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent c2d421e1
...@@ -339,7 +339,11 @@ bitmap_ipmac_tlist(const struct ip_set *set, ...@@ -339,7 +339,11 @@ bitmap_ipmac_tlist(const struct ip_set *set,
nla_put_failure: nla_put_failure:
nla_nest_cancel(skb, nested); nla_nest_cancel(skb, nested);
ipset_nest_end(skb, atd); ipset_nest_end(skb, atd);
return -EMSGSIZE; if (unlikely(id == first)) {
cb->args[2] = 0;
return -EMSGSIZE;
}
return 0;
} }
static int static int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment