bonding: wait for master connection to be available

Currently slaves only wait for the master device to be present. This is
insufficient, we want to wait for the master connection to be activated.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
This commit is contained in:
Thomas Graf 2011-11-21 17:50:13 +01:00 committed by Dan Williams
parent 0ec51387c0
commit 6346bd60be

View file

@ -736,6 +736,7 @@ check_master_dependency (NMManager *manager, NMDevice *device, NMConnection *con
NMSettingConnection *s_con;
NMDevice *master_device;
const char *master;
NMActRequest *req;
s_con = nm_connection_get_setting_connection (connection);
g_assert (s_con);
@ -752,6 +753,11 @@ check_master_dependency (NMManager *manager, NMDevice *device, NMConnection *con
if (!master_device)
return FALSE;
/* Make all slaves wait for the master connection to activate. */
req = nm_device_get_act_request (master_device);
if (!req || !nm_act_request_get_connection (req))
return FALSE;
nm_device_set_master (device, master_device);
return TRUE;