diff options
-rw-r--r-- | kernel/net/netfilter/ipset/ip_set_core.c | 14 |
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 } |