]> git.proxmox.com Git - mirror_ovs.git/commitdiff
datapath: Handle removal of nf_conntrack_l3proto.h
authorYifeng Sun <pkusunyifeng@gmail.com>
Fri, 10 May 2019 19:30:08 +0000 (12:30 -0700)
committerBen Pfaff <blp@ovn.org>
Fri, 10 May 2019 19:57:36 +0000 (12:57 -0700)
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.

Tested-by: Greg Rose <gvrose8192@gmail.com>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
acinclude.m4
datapath/linux/compat/nf_conntrack_proto.c

index b532a457926698867e6573d10f77ddcb79c9df51..c9b744db0b94d623d3d02dc06d727eb62a569d77 100644 (file)
@@ -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
index 4ac66f61c70d433995e6c2c97e3680224d89755f..fe291dbf25e1e2fc7617dd80b3a4e4e695df9473 100644 (file)
@@ -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