summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2013-04-13 14:05:34 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2013-04-13 14:54:21 +0200
commit275250fe3b5a9c582f9391da141ae4840fae53cd (patch)
treea45eaabd68592aa21ef21e17bb44598a6068078c
parentd1a95f0c60b18d6899f6c07ba787c26b8af97ec0 (diff)
bitmap:ip,mac: fix listing with timeout (reported by Yoann JUET)
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.
-rw-r--r--kernel/net/netfilter/ipset/ip_set_bitmap_ipmac.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/net/netfilter/ipset/ip_set_bitmap_ipmac.c b/kernel/net/netfilter/ipset/ip_set_bitmap_ipmac.c
index 0073b09..77c6d41 100644
--- a/kernel/net/netfilter/ipset/ip_set_bitmap_ipmac.c
+++ b/kernel/net/netfilter/ipset/ip_set_bitmap_ipmac.c
@@ -348,7 +348,11 @@ bitmap_ipmac_tlist(const struct ip_set *set,
nla_put_failure:
nla_nest_cancel(skb, nested);
ipset_nest_end(skb, atd);
- return -EMSGSIZE;
+ if (unlikely(id == first)) {
+ cb->args[2] = 0;
+ return -EMSGSIZE;
+ }
+ return 0;
}
static int