[ovs-dev] [PATCH V2 12/16] datapath: Check for existence of nf_hook_ops member list

Greg Rose gvrose8192 at gmail.com
Mon Sep 11 21:11:05 UTC 2017


The list member of nf_hook_ops has been removed in Linux kernel
release 4.13. Check for the definition of it in pre-4.13 kernels.

Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
---
 datapath/linux/compat/stt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c
index 07f5892..37d5f4b 100644
--- a/datapath/linux/compat/stt.c
+++ b/datapath/linux/compat/stt.c
@@ -2110,7 +2110,9 @@ int stt_init_module(void)
 	if (rc)
 		goto out2;
 
+#ifdef HAVE_LIST_IN_NF_HOOK_OPS
 	INIT_LIST_HEAD(&nf_hook_ops.list);
+#endif
 	pr_info("STT tunneling driver\n");
 	return 0;
 out2:
-- 
1.8.3.1



More information about the dev mailing list