Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 217440

Kernel 4.1.2 needs a patch for Workstation vmnet module

$
0
0

I'm still running Workstation 8.0.6 build-1035888 on Linux.  Specifically Fedora 22.

The recent Fedora update of kernel version 4.0.8 up to 4.1.2 rendered my kernel modules out of date and I found that vmnet would no longer compile successfully. 

The error was very similar to a previous one from an issue with kernel 3.13

 

/tmp/modconfig-LTmunl/vmnet-only/filter.c:206:1: error: conflicting types for ‘VNetFilterHookFn’

VNetFilterHookFn(unsigned int hooknum,                 // IN:

^

/tmp/modconfig-LTmunl/vmnet-only/filter.c:64:18: note: previous declaration of ‘VNetFilterHookFn’ was here

static nf_hookfn VNetFilterHookFn;

 

The following patch fixed it for me as the problem was a further change in the Linux netfilter.h file where the definition of  nf_hookfn has changed.

 

--- vmnet-only/filter.c    2015-07-30 19:23:08.368819815 +0100

+++ vmnet-only/filter.c.new    2015-07-30 19:22:41.786537641 +0100

@@ -213,9 +213,14 @@

#else

                  struct sk_buff **pskb,                // IN:

#endif

+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 2)

                  const struct net_device *in,          // IN:

                  const struct net_device *out,         // IN:

                  int (*okfn)(struct sk_buff *))        // IN:

+#else

+                 const struct nf_hook_state *state)    // IN:

+#endif

+

{

#ifndef VMW_NFHOOK_USES_SKB

    struct sk_buff *skb = *pskb;

 

To apply it, copy it into a file called /root/vmnet.patch and use the following (as root) -

 

cd /root

mkdir vmware_modules

cp /usr/lib/vmware/modules/source/vmnet.tar /usr/lib/vmware/modules/source/vmnet.tar.orig

cp /usr/lib/vmware/modules/source/vmnet.tar vmware_modules

cd vmware_modules

tar xf vmnet.tar

patch -p 0 < /root/vmnet.patch

tar cf vmnet.tar vmnet-only

cp vmnet.tar /usr/lib/vmware/modules/source

cd /root

rm -rf vmware_modules

 

Then rebuild your modules as usual.


Viewing all articles
Browse latest Browse all 217440

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>