]> git.proxmox.com Git - mirror_ovs.git/blobdiff - datapath/compat.h
cirrus: Use FreeBSD 12.2.
[mirror_ovs.git] / datapath / compat.h
index 8bf779f5f20d1401ed706fafe2b21d4d5a3085a8..b820251a47670b54ba9a015a3dc00fbb31015302 100644 (file)
 #include <net/route.h>
 #include <net/xfrm.h>
 #include <net/netfilter/ipv6/nf_defrag_ipv6.h>
+#include <net/netfilter/nf_conntrack_count.h>
+
+/* Fix grsecurity patch compilation issue. */
+#ifdef CONSTIFY_PLUGIN
+#include <linux/cache.h>
+#undef __read_mostly
+#define __read_mostly
+#endif
 
 /* Even though vanilla 3.10 kernel has grp->id, RHEL 7 kernel is missing
  * this field. */
@@ -35,7 +43,6 @@
 #define GROUP_ID(grp)  0
 #endif
 
-#ifdef OVS_FRAGMENT_BACKPORT
 #ifdef HAVE_NF_IPV6_OPS_FRAGMENT
 static inline int __init ip6_output_init(void) { return 0; }
 static inline void ip6_output_exit(void) { }
@@ -60,8 +67,14 @@ static inline int __init compat_init(void)
        if (err)
                goto error_frag6_exit;
 
+       err = rpl_nf_conncount_modinit();
+       if (err)
+               goto error_nf_conncount_exit;
+
        return 0;
 
+error_nf_conncount_exit:
+       rpl_nf_conncount_modexit();
 error_frag6_exit:
        nf_ct_frag6_cleanup();
 error_ipfrag_exit:
@@ -70,13 +83,10 @@ error_ipfrag_exit:
 }
 static inline void compat_exit(void)
 {
+       rpl_nf_conncount_modexit();
        ip6_output_exit();
        nf_ct_frag6_cleanup();
        rpl_ipfrag_fini();
 }
-#else
-static inline int __init compat_init(void) { return 0; }
-static inline void compat_exit(void) { }
-#endif
 
 #endif /* compat.h */