]> git.proxmox.com Git - mirror_ovs.git/commit
datapath: compat: Backport nf_conntrack_timeout support
authorYi-Hung Wei <yihung.wei@gmail.com>
Wed, 28 Aug 2019 22:14:27 +0000 (15:14 -0700)
committerJustin Pettit <jpettit@ovn.org>
Thu, 26 Sep 2019 20:50:17 +0000 (13:50 -0700)
commit2fc8309bd6f1a3f8193d4a180dbc239ae83e8933
tree63b7bc42c8b043bc2467aa8d924ec574702ec075
parent993cae678bca283cf0ef553bed5df99c7bb15b13
datapath: compat: Backport nf_conntrack_timeout support

This patch brings in nf_ct_timeout_put() and nf_ct_set_timeout()
when it is not available in the kernel.

Three symbols are created in acinclude.m4.

* HAVE_NF_CT_SET_TIMEOUT is used to determine if upstream net-next commit
717700d183d65 ("netfilter: Export nf_ct_{set,destroy}_timeout()") is
availabe.  If it is defined, the kernel should have all the
nf_conntrack_timeout support that OVS needs.

* HAVE_NF_CT_TIMEOUT is used to check if upstream net-next commit
6c1fd7dc489d9 ("netfilter: cttimeout: decouple timeout policy from
nfnetlink_cttimeout object") is there.  If it is not defined, we
will use the old ctnl_timeout interface rather than the nf_ct_timeout
interface that is introduced in this commit.

* HAVE_NF_CT_TIMEOUT_FIND_GET_HOOK_NET is used to check if upstream
commit 19576c9478682 ("netfilter: cttimeout: add netns support") is
there, so that we pass different arguement based on whether the kernel
has netns support.

Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Justin Pettit <jpettit@ovn.org>
acinclude.m4
datapath/linux/Modules.mk
datapath/linux/compat/include/net/netfilter/nf_conntrack_timeout.h [new file with mode: 0644]
datapath/linux/compat/nf_conntrack_timeout.c [new file with mode: 0644]