diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2018-10-22 20:47:35 +0200 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2018-10-22 20:47:35 +0200 |
commit | 01b198d0a734ebadcd8d3cfcb2201e79bef448bd (patch) | |
tree | 4569360f5f42e7c81f4597fb7b917c73578a9a53 | |
parent | a192069c576cd7d4b7174f26af27950b0a95d269 (diff) | |
download | ipset-01b198d0a734ebadcd8d3cfcb2201e79bef448bd.tar.gz |
Add compatibility support for async in pernet_operations.
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | kernel/include/linux/netfilter/ipset/ip_set_compat.h.in | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 7d0fa01..1532997 100644 --- a/configure.ac +++ b/configure.ac @@ -363,6 +363,16 @@ else AC_SUBST(HAVE_NET_OPS_ID, undef) fi +AC_MSG_CHECKING([kernel source for async in struct pernet_operations]) +if test -f $ksourcedir/include/net/net_namespace.h && \ + $AWK '/^struct pernet_operations /,/^}/' $ksourcedir/include/net/net_namespace.h | $GREP -q 'bool async;'; then + AC_MSG_RESULT(yes) + AC_SUBST(HAVE_NET_OPS_ASYNC, define) +else + AC_MSG_RESULT(no) + AC_SUBST(HAVE_NET_OPS_ASYNC, undef) +fi + AC_MSG_CHECKING([kernel source for user_ns in struct net]) if test -f $ksourcedir/include/net/net_namespace.h && \ $AWK '/^struct net \{/,/^}/' $ksourcedir/include/net/net_namespace.h | $GREP -q 'user_ns'; then diff --git a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in index 53bd588..b93d662 100644 --- a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in +++ b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in @@ -21,6 +21,7 @@ #@HAVE_CHECKENTRY_BOOL@ HAVE_CHECKENTRY_BOOL #@HAVE_XT_TARGET_PARAM@ HAVE_XT_TARGET_PARAM #@HAVE_NET_OPS_ID@ HAVE_NET_OPS_ID +#@HAVE_NET_OPS_ASYNC@ HAVE_NET_OPS_ASYNC #@HAVE_USER_NS_IN_STRUCT_NET@ HAVE_USER_NS_IN_STRUCT_NET #@HAVE_RBTREE_POSTORDER_FOR_EACH_ENTRY_SAFE@ HAVE_RBTREE_POSTORDER_FOR_EACH_ENTRY_SAFE #@HAVE_KVCALLOC@ HAVE_KVCALLOC |