network: do not enter failed state if device's sysfs entry does not exist yet
This commit is contained in:
parent
b1b0b42e48
commit
4d59e14f32
|
@ -3116,8 +3116,8 @@ int link_add(Manager *m, sd_netlink_message *message, Link **ret) {
|
||||||
sprintf(ifindex_str, "n%d", link->ifindex);
|
sprintf(ifindex_str, "n%d", link->ifindex);
|
||||||
r = sd_device_new_from_device_id(&device, ifindex_str);
|
r = sd_device_new_from_device_id(&device, ifindex_str);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
log_link_warning_errno(link, r, "Could not find device: %m");
|
log_link_warning_errno(link, r, "Could not find device, waiting for device initialization: %m");
|
||||||
goto failed;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
r = sd_device_get_is_initialized(device);
|
r = sd_device_get_is_initialized(device);
|
||||||
|
|
Loading…
Reference in a new issue