From: Jozsef Kadlecsik Date: Wed, 22 May 2024 17:55:29 +0000 (+0200) Subject: Handle "netfilter: propagate net to nf_bridge_get_physindev" patch X-Git-Tag: v7.22~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=21bc8c65e4e4445b2ed6c4196534629a723f818e;p=thirdparty%2Fipset.git Handle "netfilter: propagate net to nf_bridge_get_physindev" patch Handle backward compatibility with regard of the patch. Signed-off-by: Jozsef Kadlecsik --- diff --git a/configure.ac b/configure.ac index 1e449457..5f1be0e7 100644 --- a/configure.ac +++ b/configure.ac @@ -890,6 +890,16 @@ else AC_SUBST(HAVE_GFP_KERNEL_ACCOUNT, undef) fi +AC_MSG_CHECKING([kernel source for second arg of nf_bridge_get_physindev() in netfilter_bridge.h]) +if test -f $ksourcedir/include/linux/netfilter_bridge.h && \ + $GREP 'nf_bridge_get_physindev' $ksourcedir/include/linux/netfilter_bridge.h | $GREP -q ' struct net '; then + AC_MSG_RESULT(yes) + AC_SUBST(HAVE_NF_BRIDGE_GET_PYSINDEV_NET, define) +else + AC_MSG_RESULT(no) + AC_SUBST(HAVE_NF_BRIDGE_GET_PYSINDEV_NET, undef) +fi + AC_MSG_CHECKING([kernel source for struct net_generic]) if test -f $ksourcedir/include/net/netns/generic.h && \ $GREP -q 'struct net_generic' $ksourcedir/include/net/netns/generic.h; 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 5746f39c..8878da9a 100644 --- a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in +++ b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in @@ -69,6 +69,7 @@ #@HAVE_NFNL_CALLBACK_TYPE@ HAVE_NFNL_CALLBACK_TYPE #@HAVE_EAGAIN_IN_NFNETLINK_UNICAST@ HAVE_EAGAIN_IN_NFNETLINK_UNICAST #@HAVE_NLMSG_UNICAST@ HAVE_NLMSG_UNICAST +#@HAVE_NF_BRIDGE_GET_PYSINDEV_NET@ HAVE_NF_BRIDGE_GET_PYSINDEV_NET #ifdef HAVE_EXPORT_SYMBOL_GPL_IN_MODULE_H #include