2017-09-21 12:40:13 +02:00
|
|
|
Index: VirtualBox-5.1.28/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
|
|
|
|
===================================================================
|
|
|
|
--- VirtualBox-5.1.28.orig/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
|
|
|
|
+++ VirtualBox-5.1.28/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
|
2017-09-21 15:54:20 +02:00
|
|
|
@@ -353,12 +353,17 @@ static void vboxPciFileClose(struct fil
|
|
|
|
static int vboxPciFileWrite(struct file* file, unsigned long long offset, unsigned char* data, unsigned int size)
|
|
|
|
{
|
|
|
|
int ret;
|
2017-09-21 12:40:13 +02:00
|
|
|
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
|
2017-09-21 15:54:20 +02:00
|
|
|
+
|
2017-09-21 12:40:13 +02:00
|
|
|
+ ret = kernel_write(file, data, size, &offset);
|
|
|
|
+#else
|
2017-09-21 15:54:20 +02:00
|
|
|
mm_segment_t fs_save;
|
|
|
|
|
|
|
|
fs_save = get_fs();
|
|
|
|
set_fs(get_ds());
|
2017-09-21 12:40:13 +02:00
|
|
|
ret = vfs_write(file, data, size, &offset);
|
|
|
|
set_fs(fs_save);
|
2017-09-21 15:54:20 +02:00
|
|
|
+#endif
|
2017-09-21 12:40:13 +02:00
|
|
|
if (ret < 0)
|
|
|
|
printk(KERN_DEBUG "vboxPciFileWrite: error %d\n", ret);
|
2017-09-21 15:54:20 +02:00
|
|
|
|
|
|
|
Index: VirtualBox-5.1.28/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
|
|
|
===================================================================
|
|
|
|
--- VirtualBox-5.1.28.orig/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
|
|
|
+++ VirtualBox-5.1.28/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
|
|
|
@@ -124,6 +124,10 @@ typedef struct VBOXNETFLTNOTIFIER *PVBOX
|
|
|
|
# define bstats stats
|
|
|
|
# define qstats stats
|
|
|
|
# endif
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
|
|
|
|
+#define SKB_GSO_UDP 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
|
|
|
|
@@ -722,9 +726,11 @@ static struct sk_buff *vboxNetFltLinuxSk
|
|
|
|
case PDMNETWORKGSOTYPE_IPV4_TCP:
|
|
|
|
fGsoType = SKB_GSO_TCPV4;
|
|
|
|
break;
|
|
|
|
+# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
|
|
|
case PDMNETWORKGSOTYPE_IPV4_UDP:
|
|
|
|
fGsoType = SKB_GSO_UDP;
|
|
|
|
break;
|
|
|
|
+#endif
|
|
|
|
case PDMNETWORKGSOTYPE_IPV6_TCP:
|
|
|
|
fGsoType = SKB_GSO_TCPV6;
|
|
|
|
break;
|