[ovs-dev,11/15] datapath: Check for existence of nf_hook_ops member list

Message ID 1505152570-6143-11-git-send-email-gvrose8192@gmail.com
State New
Headers show
Series
  • [ovs-dev,01/15] acinclude: Check for SKB_GSO_UDP
Related show

Commit Message

Greg Rose Sept. 11, 2017, 5:56 p.m.
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@gmail.com>
---
 datapath/linux/compat/stt.c | 2 ++
 1 file changed, 2 insertions(+)

Patch

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: