summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-03-27 16:39:57 +0200
committerThomas Haller <thaller@redhat.com>2018-03-29 11:24:32 +0200
commitf9639b4e7e7aba2f4deaa18601d99ed787b4356a (patch)
tree2e7c6b3410f0f7baee8ec053d8881a40545b321b
parent87a8c562efd20b95d16e11c312ab85ff7659980b (diff)
downloadNetworkManager-f9639b4e7e7aba2f4deaa18601d99ed787b4356a.tar.gz
checkpoint: skip unrealized devices in nm_checkpoint_manager_create()
We already do it for the case where no paths are provided.
-rw-r--r--src/nm-checkpoint-manager.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nm-checkpoint-manager.c b/src/nm-checkpoint-manager.c
index 72066f7d44..5b434a1271 100644
--- a/src/nm-checkpoint-manager.c
+++ b/src/nm-checkpoint-manager.c
@@ -195,6 +195,11 @@ nm_checkpoint_manager_create (NMCheckpointManager *self,
"device %s does not exist", *dev_paths);
return NULL;
}
+ if (!nm_device_is_real (device)) {
+ g_set_error (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_DEVICE,
+ "device %s is not realized", *dev_paths);
+ return NULL;
+ }
g_ptr_array_add (devices, device);
}