aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lguest
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2015-02-13 01:43:44 -0500
committerRusty Russell <rusty@rustcorp.com.au>2015-02-13 01:45:55 -0500
commit206ad06b2e88a3d826c99da8c8b3ed98e287ad87 (patch)
tree0e328ded74551fdc6b7f92a878ba83c1fc6fc61b /tools/lguest
parented9ecb0415b97b5f9f91f146e1977bb372c74c6d (diff)
tools/lguest: don't use legacy definitions for net device in example launcher.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'tools/lguest')
-rw-r--r--tools/lguest/lguest.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/lguest/lguest.c b/tools/lguest/lguest.c
index eebe94b84e8c..e44052483ed9 100644
--- a/tools/lguest/lguest.c
+++ b/tools/lguest/lguest.c
@@ -66,6 +66,7 @@ typedef uint8_t u8;
66#define VIRTIO_CONFIG_NO_LEGACY 66#define VIRTIO_CONFIG_NO_LEGACY
67#define VIRTIO_PCI_NO_LEGACY 67#define VIRTIO_PCI_NO_LEGACY
68#define VIRTIO_BLK_NO_LEGACY 68#define VIRTIO_BLK_NO_LEGACY
69#define VIRTIO_NET_NO_LEGACY
69 70
70/* Use in-kernel ones, which defines VIRTIO_F_VERSION_1 */ 71/* Use in-kernel ones, which defines VIRTIO_F_VERSION_1 */
71#include "../../include/uapi/linux/virtio_config.h" 72#include "../../include/uapi/linux/virtio_config.h"
@@ -2816,7 +2817,7 @@ static int get_tun_device(char tapif[IFNAMSIZ])
2816 * about our expanded header (which is called 2817 * about our expanded header (which is called
2817 * virtio_net_hdr_mrg_rxbuf in the legacy system). 2818 * virtio_net_hdr_mrg_rxbuf in the legacy system).
2818 */ 2819 */
2819 vnet_hdr_sz = sizeof(struct virtio_net_hdr_mrg_rxbuf); 2820 vnet_hdr_sz = sizeof(struct virtio_net_hdr_v1);
2820 if (ioctl(netfd, TUNSETVNETHDRSZ, &vnet_hdr_sz) != 0) 2821 if (ioctl(netfd, TUNSETVNETHDRSZ, &vnet_hdr_sz) != 0)
2821 err(1, "Setting tun header size to %u", vnet_hdr_sz); 2822 err(1, "Setting tun header size to %u", vnet_hdr_sz);
2822 2823