| | 29 | |
| | 30 | The patch file : |
| | 31 | |
| | 32 | {{{ |
| | 33 | --- VBoxNetFlt-linux.c 2020-04-09 19:56:04.000000000 +0200 |
| | 34 | +++ /usr/src/kernel-modules/virtualbox/src/vboxnetflt/linux/VBoxNetFlt-linux.c 2020-06-11 16:32:18.000000000 +0200 |
| | 35 | @@ -1,4 +1,4 @@ |
| | 36 | -/* $Id: VBoxNetFlt-linux.c 135976 2020-02-04 10:35:17Z bird $ */ |
| | 37 | +/* $Id: VBoxNetFlt-linux.c $ */ |
| | 38 | /** @file |
| | 39 | * VBoxNetFlt - Network Filter Driver (Host), Linux Specific Code. |
| | 40 | */ |
| | 41 | @@ -73,6 +73,10 @@ |
| | 42 | #define VBOXNETFLT_OS_SPECFIC 1 |
| | 43 | #include "../VBoxNetFltInternal.h" |
| | 44 | |
| | 45 | +# if defined(CONFIG_SUSE_VERSION) & CONFIG_SUSE_VERSION == 15 && CONFIG_SUSE_PATCHLEVEL == 2 |
| | 46 | +# define OPENSUSE_152 |
| | 47 | +# endif |
| | 48 | + |
| | 49 | typedef struct VBOXNETFLTNOTIFIER { |
| | 50 | struct notifier_block Notifier; |
| | 51 | PVBOXNETFLTINS pThis; |
| | 52 | @@ -924,7 +928,7 @@ |
| | 53 | for (i = 0; i < skb_shinfo(pBuf)->nr_frags; i++) |
| | 54 | { |
| | 55 | skb_frag_t *pFrag = &skb_shinfo(pBuf)->frags[i]; |
| | 56 | -# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) |
| | 57 | +# if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || defined(OPENSUSE_152) |
| | 58 | pSG->aSegs[iSeg].cb = pFrag->bv_len; |
| | 59 | pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->bv_offset; |
| | 60 | # else /* < KERNEL_VERSION(5, 4, 0) */ |
| | 61 | @@ -945,7 +949,7 @@ |
| | 62 | for (i = 0; i < skb_shinfo(pFragBuf)->nr_frags; i++) |
| | 63 | { |
| | 64 | skb_frag_t *pFrag = &skb_shinfo(pFragBuf)->frags[i]; |
| | 65 | -# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) |
| | 66 | +# if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || defined(OPENSUSE_152) |
| | 67 | pSG->aSegs[iSeg].cb = pFrag->bv_len; |
| | 68 | pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->bv_offset; |
| | 69 | # else /* < KERNEL_VERSION(5, 4, 0) */ |
| | 70 | }}} |
| | 71 | |
| | 72 | To apply the patch assuming virtualbox is installed put the above patch into a file like /tmp/patch123.diff and run |
| | 73 | |
| | 74 | {{{ |
| | 75 | cd /usr/share/virtualbox/src/vboxhost/vboxnetflt/linux/ |
| | 76 | patch -b </tmp/patch123.diff |
| | 77 | }}} |
| | 78 | |
| | 79 | and you should get an answer like |
| | 80 | {{{ |
| | 81 | patching file VBoxNetFlt-linux.c |
| | 82 | }}} |
| | 83 | then leave the place and recompile : |
| | 84 | |
| | 85 | {{{ |
| | 86 | cd |
| | 87 | /sbin/vboxconfig |
| | 88 | }}} |
| | 89 | |
| | 90 | and that's it. |
| | 91 | |
| | 92 | Rgds ... ichamel |
| | 93 | |