[ovs-dev] [PATCH 1/7 v2] datapath: Handle removal of nf_conntrack_l3proto.h
Yifeng Sun
pkusunyifeng at gmail.com
Fri May 10 19:22:12 UTC 2019
Upstream kernel commit a0ae2562 ("netfilter: conntrack: remove l3proto
abstraction") removed header file net/netfilter/nf_conntrack_l3proto.h.
This patch detects it and fixes compilation errors of OVS on 4.19+ kernels.
Signed-off-by: Yifeng Sun <pkusunyifeng at gmail.com>
Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>
---
acinclude.m4 | 3 +++
datapath/linux/compat/nf_conntrack_proto.c | 2 ++
2 files changed, 5 insertions(+)
diff --git a/acinclude.m4 b/acinclude.m4
index b532a4579266..c9b744db0b94 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -926,6 +926,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
[OVS_DEFINE([HAVE_KVMALLOC_ARRAY])])
OVS_GREP_IFELSE([$KSRC/include/linux/mm.h], [kvmalloc_node],
[OVS_DEFINE([HAVE_KVMALLOC_NODE])])
+ OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_l3proto.h],
+ [nf_conntrack_l3proto],
+ [OVS_DEFINE([HAVE_NF_CONNTRACK_L3PROATO_H])])
if cmp -s datapath/linux/kcompat.h.new \
datapath/linux/kcompat.h >/dev/null 2>&1; then
diff --git a/datapath/linux/compat/nf_conntrack_proto.c b/datapath/linux/compat/nf_conntrack_proto.c
index 4ac66f61c70d..fe291dbf25e1 100644
--- a/datapath/linux/compat/nf_conntrack_proto.c
+++ b/datapath/linux/compat/nf_conntrack_proto.c
@@ -1,7 +1,9 @@
#include <linux/types.h>
#include <net/netfilter/nf_conntrack.h>
+#ifdef HAVE_NF_CONNTRACK_L3PROATO_H
#include <net/netfilter/nf_conntrack_l3proto.h>
+#endif
/*
* Upstream net-next commmit 7e35ec0e8044
--
2.7.4
More information about the dev
mailing list