Guest User

Untitled

a guest
Feb 24th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.48 KB | None | 0 0
  1. Virtual machine monitor done
  2. Virtual machine communication interface done
  3. VM communication interface socket family done
  4. Blocking file system done
  5. Virtual ethernet failed
  6. VMware Authentication Daemon done
  7.  
  8. 205a206
  9. > #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
  10. 206a208,210
  11. > #else
  12. > VNetFilterHookFn(const struct nf_hook_ops *ops, // IN:
  13. > #endif
  14. 255c259,263
  15. < transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
  16. ---
  17. > #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
  18. > transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
  19. > #else
  20. > transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING);
  21. > #endif
  22.  
  23. sudo -E -s
  24.  
  25. cd /usr/lib/vmware/modules/source/
  26.  
  27. cp vmnet.tar vmnet.tar.original
  28.  
  29. tar xvf vmnet.tar vmnet-only/filter.c
  30.  
  31. patch vmnet-only/filter.c < /tmp/filter.c.diff
  32.  
  33. tar -uvf vmnet.tar vmnet-only/filter.c
  34.  
  35. rm -rf vmnet-only/
  36.  
  37. Starting VMware services:
  38. Virtual machine monitor done
  39. Virtual machine communication interface done
  40. VM communication interface socket family done
  41. Blocking file system done
  42. Virtual ethernet done
  43. VMware Authentication Daemon done
  44. Shared Memory Available done
  45.  
  46. sudo chown -R one:one .vmware
  47.  
  48. curl http://pastie.org/pastes/9636106/download -o /tmp/vmware-3.17.patch
  49.  
  50. cd /usr/lib/vmware/modules/source
  51. for i in vmci vmmon vmnet vsock; do tar -xf $i.tar; done
  52.  
  53. patch -p1 -i /tmp/vmware-3.17.patch
  54.  
  55. for i in *-only; do tar -cf ${i/-only}.tar $i; done
  56.  
  57. rm -r *-only
  58.  
  59. vmware-modconfig --console --install-all
  60.  
  61. userif.c
  62.  
  63. #!/bin/bash
  64.  
  65. cat << EOF > /tmp/filter.c.patch
  66. --- vmnet-only/filter.c 2013-10-18 15:11:55.000000000 -0400
  67. +++ vmnet-only/filter.c 2013-12-21 20:15:15.000000000 -0500
  68. @@ -27,6 +27,7 @@
  69. #include "compat_module.h"
  70. #include <linux/mutex.h>
  71. #include <linux/netdevice.h>
  72. +#include <linux/version.h>
  73. #if COMPAT_LINUX_VERSION_CHECK_LT(3, 2, 0)
  74. # include <linux/module.h>
  75. #else
  76. @@ -203,7 +204,11 @@
  77. #endif
  78.  
  79. static unsigned int
  80. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
  81. VNetFilterHookFn(unsigned int hooknum, // IN:
  82. +#else
  83. +VNetFilterHookFn(const struct nf_hook_ops *ops, // IN:
  84. +#endif
  85. #ifdef VMW_NFHOOK_USES_SKB
  86. struct sk_buff *skb, // IN:
  87. #else
  88. @@ -252,7 +257,12 @@
  89.  
  90. /* When the host transmits, hooknum is VMW_NF_INET_POST_ROUTING. */
  91. /* When the host receives, hooknum is VMW_NF_INET_LOCAL_IN. */
  92. - transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
  93. +
  94. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
  95. + transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
  96. +#else
  97. + transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING);
  98. +#endif
  99.  
  100. packetHeader = compat_skb_network_header(skb);
  101. ip = (struct iphdr*)packetHeader;
  102. EOF
  103.  
  104. cd /usr/lib/vmware/modules/source
  105. # untar the vmnet modules
  106. tar -xvf vmnet.tar
  107. #run a the patch you should have just saved earlier
  108. patch vmnet-only/filter.c < /tmp/filter.c.patch
  109. # re-tar the modules
  110. tar -uvf vmnet.tar vmnet-only
  111. #delete the previous working directory
  112. rm -rf vmnet-only
Add Comment
Please, Sign In to add comment