summaryrefslogtreecommitdiffstats
path: root/kernel/net
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-05-10 11:12:24 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2012-05-10 11:12:24 +0200
commit50b3c64344fc76aeeac3f1e56f004743b1e52846 (patch)
treedd524c1d0f219d78b9371cc32522dbe2cfaa6c42 /kernel/net
parent1a3d302abd9ac4eae735a843eecb1e0fb028d722 (diff)
netlink: add netlink_dump_control structure for netlink_dump_start()
Backport of Pablo's patch to the ipset package.
Diffstat (limited to 'kernel/net')
-rw-r--r--kernel/net/netfilter/ipset/ip_set_core.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/kernel/net/netfilter/ipset/ip_set_core.c b/kernel/net/netfilter/ipset/ip_set_core.c
index 51ceea5..27f35ac 100644
--- a/kernel/net/netfilter/ipset/ip_set_core.c
+++ b/kernel/net/netfilter/ipset/ip_set_core.c
@@ -1172,12 +1172,22 @@ ip_set_dump(struct sock *ctnl, struct sk_buff *skb,
if (unlikely(protocol_failed(attr)))
return -IPSET_ERR_PROTOCOL;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0)
return netlink_dump_start(ctnl, skb, nlh,
ip_set_dump_start,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0)
ip_set_dump_done);
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
+ return netlink_dump_start(ctnl, skb, nlh,
+ ip_set_dump_start,
ip_set_dump_done, 0);
+#else
+ {
+ struct netlink_dump_control c = {
+ .dump = ip_set_dump_start,
+ .done = ip_set_dump_done,
+ };
+ return netlink_dump_start(ctnl, skb, nlh, &c);
+ }
#endif
}