summaryrefslogtreecommitdiffstats
path: root/usr.sbin/vmd/vm.c
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2017-04-19 15:38:32 +0000
committerreyk <reyk@openbsd.org>2017-04-19 15:38:32 +0000
commit470adcf5f09468c440f98fb57a26d5d9f66eb933 (patch)
treefd9f20d9cb0c7951b4f4a923d7114d6b6409e904 /usr.sbin/vmd/vm.c
parentUse the rt_rmx defines that hide the struct rt_kmetrics indirection. (diff)
downloadwireguard-openbsd-470adcf5f09468c440f98fb57a26d5d9f66eb933.tar.xz
wireguard-openbsd-470adcf5f09468c440f98fb57a26d5d9f66eb933.zip
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@
Diffstat (limited to 'usr.sbin/vmd/vm.c')
-rw-r--r--usr.sbin/vmd/vm.c4
1 files changed, 2 insertions, 2 deletions
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 <mlarkin@openbsd.org>
@@ -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);
}
/*