]> git.proxmox.com Git - mirror_ovs.git/commit
compat: Backport nf_ct_netns_{get, put}()
authorYi-Hung Wei <yihung.wei@gmail.com>
Fri, 17 Aug 2018 09:05:02 +0000 (02:05 -0700)
committerJustin Pettit <jpettit@ovn.org>
Fri, 17 Aug 2018 16:30:12 +0000 (09:30 -0700)
commit179fccce34db7af112be3c6e8ad114802cb235bd
tree09325b319c26eaa3a59d41a8eddcd0bb630461be
parent7f63d8302e6387db6c27b1ba38c088e185841206
compat: Backport nf_ct_netns_{get, put}()

This patch backports nf_ct_netns_get/put() in order to support a feature
in the follow up patch.

nf_ct_netns_{get,put} were first introduced in upstream net-next commit
ecb2421b5ddf ("netfilter: add and use nf_ct_netns_get/put") in kernel
v4.10, and then updated in commmit 7e35ec0e8044 ("netfilter: conntrack:
move nf_ct_netns_{get,put}() to core") in kernel v4.15.  We need to
invoke nf_ct_netns_get/put() when the underlying nf_conntrack_l3proto
supports net_ns_{get,put}().

Therefore, there are 3 cases that we need to consider.
1) Before nf_ct_{get,put}() is introduced.
    We just mock nf_ct_nets_{get,put}() and do nothing.

2) After 1) and before v4.15
    Backports based on commit 7e35ec0e8044 .

3) Staring from v4.15
    Use the upstream version.

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.h
datapath/linux/compat/include/uapi/linux/netfilter.h [new file with mode: 0644]
datapath/linux/compat/nf_conntrack_proto.c [new file with mode: 0644]