From 470adcf5f09468c440f98fb57a26d5d9f66eb933 Mon Sep 17 00:00:00 2001 From: reyk Date: Wed, 19 Apr 2017 15:38:32 +0000 Subject: Add support for dynamic "NAT" interfaces (-L/local interface). When a local interface is configured, vmd configures a /31 address on the tap(4) interface of the host and provides another IP in the same subnet via DHCP (BOOTP) to the VM. vmd runs an internal BOOTP server that replies with IP, gateway, and DNS addresses to the VM. The built-in server only ever responds to the VM on the inside and cannot leak its DHCP responses to the outside. Thanks to Uwe Werler, Josh Grosse, and some others for testing! OK deraadt@ --- usr.sbin/vmd/vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/vmd/vm.c') diff --git a/usr.sbin/vmd/vm.c b/usr.sbin/vmd/vm.c index b833d8da897..6ce5f519f52 100644 --- a/usr.sbin/vmd/vm.c +++ b/usr.sbin/vmd/vm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm.c,v 1.11 2017/03/27 00:28:04 deraadt Exp $ */ +/* $OpenBSD: vm.c,v 1.12 2017/04/19 15:38:32 reyk Exp $ */ /* * Copyright (c) 2015 Mike Larkin @@ -656,7 +656,7 @@ init_emulated_hw(struct vmop_create_params *vmc, int *child_disks, pci_init(); /* Initialize virtio devices */ - virtio_init(vmc, child_disks, child_taps); + virtio_init(current_vm, child_disks, child_taps); } /* -- cgit v1.2.3-59-g8ed1b