diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2015-07-16 10:21:36 +0200 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2015-08-11 18:11:55 +0200 |
commit | ecdf7cba6bc0f9fd4f0e45579e1b271717411f57 (patch) | |
tree | 8ecffbb8de4b6da53b854e641bed1523f24a8f19 | |
parent | a6e3a60844aa9e2c4d24afe5b7945e0a6292dd04 (diff) | |
download | NetworkManager-ecdf7cba6bc0f9fd4f0e45579e1b271717411f57.tar.gz |
ifcfg-rh: respect DEVTIMEOUT if link is not announced by udev yet (rh #1192633)
If NIC related initialization takes a long time in udev processing, but we have
an ifindex from kernel, we still want to wait until udev is finished and the
device is really usable.
Check that by calling nm_platform_link_get_by_ifname() and checking @initialized,
which means udev is finished.
Based on a patch by t-nishimura@hf.jp.nec.com
Improved by thaller@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=1192633
-rw-r--r-- | src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c b/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c index acb5b1ece2..8fb68154b4 100644 --- a/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c +++ b/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c @@ -150,6 +150,7 @@ nm_ifcfg_connection_check_devtimeout (NMIfcfgConnection *self) const char *ifname; const char *filename; guint devtimeout; + const NMPlatformLink *pllink; s_con = nm_connection_get_setting_connection (NM_CONNECTION (self)); @@ -165,7 +166,8 @@ nm_ifcfg_connection_check_devtimeout (NMIfcfgConnection *self) if (!devtimeout) return; - if (nm_platform_link_get_ifindex (NM_PLATFORM_GET, ifname) != 0) + pllink = nm_platform_link_get_by_ifname (NM_PLATFORM_GET, ifname); + if (pllink && pllink->initialized) return; /* ONBOOT=yes, DEVICE and DEVTIMEOUT are set, but device is not present */ |