network: do not enter failed state if device's sysfs entry does not exist yet

This commit is contained in:
Yu Watanabe 2019-09-17 21:34:06 +09:00
parent b1b0b42e48
commit 4d59e14f32
1 changed files with 2 additions and 2 deletions

View File

@ -3116,8 +3116,8 @@ int link_add(Manager *m, sd_netlink_message *message, Link **ret) {
sprintf(ifindex_str, "n%d", link->ifindex);
r = sd_device_new_from_device_id(&device, ifindex_str);
if (r < 0) {
log_link_warning_errno(link, r, "Could not find device: %m");
goto failed;
log_link_warning_errno(link, r, "Could not find device, waiting for device initialization: %m");
return 0;
}
r = sd_device_get_is_initialized(device);