1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff -Naur vmnet-onlya/filter.c vmnet-only/filter.c
--- vmnet-onlya/filter.c        2013-10-18 22:11:55.000000000 +0300
+++ vmnet-only/filter.c         2014-01-27 12:38:02.363746705 +0200
@@ -203,7 +203,11 @@
 #endif
 
 static unsigned int
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
 VNetFilterHookFn(unsigned int hooknum,                 // IN:
+#else
+VNetFilterHookFn(const struct nf_hook_ops *ops,        // IN:
+#endif
 #ifdef VMW_NFHOOK_USES_SKB
                  struct sk_buff *skb,                  // IN:
 #else
@@ -252,7 +256,12 @@
 
    /* When the host transmits, hooknum is VMW_NF_INET_POST_ROUTING. */
    /* When the host receives, hooknum is VMW_NF_INET_LOCAL_IN. */
-   transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
+
+   #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
+      transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
+   #else
+      transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING);
+   #endif
 
    packetHeader = compat_skb_network_header(skb);
    ip = (struct iphdr*)packetHeader;