]> git.proxmox.com Git - mirror_ovs.git/commitdiff
nf_conntrack_proto: Fix HAVE_NET_NS_GET macro for nf_conntrack
authorYifeng Sun <pkusunyifeng@gmail.com>
Wed, 12 Dec 2018 21:24:16 +0000 (13:24 -0800)
committerBen Pfaff <blp@ovn.org>
Thu, 27 Dec 2018 19:13:27 +0000 (11:13 -0800)
In previous code, macro HAVE_NET_NS_SET is used in code but
never generated by config. This patch fixes it.

Fixes: 179fccce34db ("compat: Backport nf_ct_netns_{get, put}()")
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 7ee3092d589bd28addff865b85e7de48bc3354d6..8b43d2bfe98301910278c2fef3b98a191ea9ae55 100644 (file)
@@ -634,8 +634,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
                   [nf_ct_is_untracked])
   OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_zones.h],
                   [nf_ct_zone_init])
-  OVS_FIND_FIELD_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_l3proto.h],
-                        [net_ns_get])
+  OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_l3proto.h],
+                  [net_ns_get])
   OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_labels.h],
                   [nf_connlabels_get])
   OVS_FIND_PARAM_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_labels.h],
index e877d763892d2398b559c5f4a675ff4cfb54061d..4ac66f61c70d433995e6c2c97e3680224d89755f 100644 (file)
  *
  * However, we only need this feature if the underlying nf_conntrack_l3proto
  * supports net_ns_get/put.  Thus, we just mock the functions if
- * HAVE_NET_NS_SET is false.
+ * HAVE_NET_NS_GET is false.
  */
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
-#ifdef HAVE_NET_NS_SET
+#ifdef HAVE_NET_NS_GET
 static int nf_ct_netns_do_get(struct net *net, u8 nfproto)
 {
        const struct nf_conntrack_l3proto *l3proto;
@@ -96,7 +96,7 @@ void rpl_nf_ct_netns_put(struct net *net, uint8_t nfproto)
 }
 EXPORT_SYMBOL_GPL(rpl_nf_ct_netns_put);
 
-#else /* !HAVE_NET_NS_SET */
+#else /* !HAVE_NET_NS_GET */
 void rpl_nf_ct_netns_put(struct net *net, uint8_t nfproto)
 {
 }
@@ -108,5 +108,5 @@ int rpl_nf_ct_netns_get(struct net *net, u8 nfproto)
 }
 EXPORT_SYMBOL_GPL(rpl_nf_ct_netns_get);
 
-#endif /* HAVE_NET_NS_SET */
+#endif /* HAVE_NET_NS_GET */
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) */