diff options
author | 2017-08-13 16:45:07 +0000 | |
---|---|---|
committer | 2017-08-13 16:45:07 +0000 | |
commit | c132cd25b9b15c9e263803e3590bee12d46c1b6d (patch) | |
tree | c290765187aa5ee97fc03179e396f7eead144020 | |
parent | Remove support for the TLS padding extension. (diff) | |
download | wireguard-openbsd-c132cd25b9b15c9e263803e3590bee12d46c1b6d.tar.xz wireguard-openbsd-c132cd25b9b15c9e263803e3590bee12d46c1b6d.zip |
don't issue a termination command to an already stopped vm
ok mlarkin@
-rw-r--r-- | usr.sbin/vmd/vmd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/vmd/vmd.c b/usr.sbin/vmd/vmd.c index e12953c6fb4..beae201c2b1 100644 --- a/usr.sbin/vmd/vmd.c +++ b/usr.sbin/vmd/vmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmd.c,v 1.64 2017/07/15 05:05:36 pd Exp $ */ +/* $OpenBSD: vmd.c,v 1.65 2017/08/13 16:45:07 jasper Exp $ */ /* * Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org> @@ -116,6 +116,10 @@ vmd_dispatch_control(int fd, struct privsep_proc *p, struct imsg *imsg) res = EALREADY; cmd = IMSG_VMDOP_TERMINATE_VM_RESPONSE; break; + } else if (vm->vm_running == 0) { + res = EINVAL; + cmd = IMSG_VMDOP_TERMINATE_VM_RESPONSE; + break; } id = vm->vm_vmid; } else if ((vm = vm_getbyvmid(id)) == NULL) { |