Advertisement
rzuber

279-vmnet-3.13.patch

Apr 14th, 2014
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.20 KB | None | 0 0
  1. --- work/vmnet-only/filter.c   2013-08-27 20:29:04.000000000 +0100
  2. +++ patched/vmnet-only/filter.c   2014-01-26 01:09:05.184893854 +0000
  3. @@ -27,6 +27,7 @@
  4.  #include "compat_module.h"
  5.  #include <linux/mutex.h>
  6.  #include <linux/netdevice.h>
  7. +#include <linux/version.h>
  8.  #if COMPAT_LINUX_VERSION_CHECK_LT(3, 2, 0)
  9.  #   include <linux/module.h>
  10.  #else
  11. @@ -203,7 +204,11 @@
  12.  #endif
  13.  
  14.  static unsigned int
  15. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
  16.  VNetFilterHookFn(unsigned int hooknum,                 // IN:
  17. +#else
  18. +VNetFilterHookFn(const struct nf_hook_ops *ops,        // IN:
  19. +#endif
  20.  #ifdef VMW_NFHOOK_USES_SKB
  21.                   struct sk_buff *skb,                  // IN:
  22.  #else
  23. @@ -252,7 +257,12 @@
  24.  
  25.     /* When the host transmits, hooknum is VMW_NF_INET_POST_ROUTING. */
  26.     /* When the host receives, hooknum is VMW_NF_INET_LOCAL_IN. */
  27. -   transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
  28. +
  29. +   #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
  30. +      transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
  31. +   #else
  32. +      transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING);
  33. +   #endif
  34.  
  35.     packetHeader = compat_skb_network_header(skb);
  36.     ip = (struct iphdr*)packetHeader;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement