diff options
author | Jozsef Kadlecsik <kadlec@netfilter.org> | 2024-05-22 19:55:29 +0200 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@netfilter.org> | 2024-05-22 19:55:29 +0200 |
commit | 21bc8c65e4e4445b2ed6c4196534629a723f818e (patch) | |
tree | 04792338afc15e15b8243acc984405b055d4f83d | |
parent | f0905d2f1507c8678eab0197f21396376c3e0f51 (diff) |
Handle "netfilter: propagate net to nf_bridge_get_physindev" patch
Handle backward compatibility with regard of the patch.
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
-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 1e44945..5f1be0e 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 5746f39..8878da9 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 <linux/module.h> |