summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac6
-rw-r--r--kernel/net/netfilter/ipset/ip_set_core.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c707755..d3a2758 100644
--- a/configure.ac
+++ b/configure.ac
@@ -319,9 +319,13 @@ elif test -f $ksourcedir/include/linux/netlink.h && \
$AWK '/ netlink_dump_start\(/,/\)/' $ksourcedir/include/linux/netlink.h | $GREP -q 'min_dump_alloc.*;'; then
AC_MSG_RESULT(6 args)
AC_SUBST(HAVE_NETLINK_DUMP_START_ARGS, 6)
-else
+elif test -f $ksourcedir/include/linux/netlink.h && \
+ $AWK '/^struct netlink_dump_control {/,/\}/' $ksourcedir/include/linux/netlink.h | $GREP -q '\(\*start\)'; then
AC_MSG_RESULT(4 args)
AC_SUBST(HAVE_NETLINK_DUMP_START_ARGS, 4)
+else
+ AC_MSG_RESULT(7 fake args)
+ AC_SUBST(HAVE_NETLINK_DUMP_START_ARGS, 7)
fi
AC_MSG_CHECKING([kernel source for ns_capable])
diff --git a/kernel/net/netfilter/ipset/ip_set_core.c b/kernel/net/netfilter/ipset/ip_set_core.c
index 082d89d..906d01a 100644
--- a/kernel/net/netfilter/ipset/ip_set_core.c
+++ b/kernel/net/netfilter/ipset/ip_set_core.c
@@ -1734,7 +1734,9 @@ IPSET_CBFN(ip_set_dump, struct net *net, struct sock *ctnl,
#else
{
struct netlink_dump_control c = {
+#if HAVE_NETLINK_DUMP_START_ARGS == 4
.start = ip_set_dump_start,
+#endif
.dump = ip_set_dump_do,
.done = ip_set_dump_done,
};