Advertisement
Guest User

vmware 3.13

a guest
Dec 21st, 2013
37,705
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.17 KB | None | 0 0
  1. --- vmnet-only/filter.c 2013-10-18 23:11:55.000000000 +0400
  2. +++ vmnet-only/filter.c 2013-12-03 04:16:31.751352170 +0400
  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,14 @@
  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