Re: [PATCH 1/8] bonding: Wait for master connection to be available
- From: Dan Williams <dcbw redhat com>
- To: Thomas Graf <tgraf redhat com>
- Cc: networkmanager-list gnome org
- Subject: Re: [PATCH 1/8] bonding: Wait for master connection to be available
- Date: Mon, 21 Nov 2011 23:42:05 -0600
On Mon, 2011-11-21 at 17:50 +0100, Thomas Graf wrote:
> 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.
Pushed, thanks.
> Signed-off-by: Thomas Graf <tgraf redhat com>
> ---
> src/nm-policy.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/src/nm-policy.c b/src/nm-policy.c
> index 3e19492..1443fb2 100644
> --- a/src/nm-policy.c
> +++ b/src/nm-policy.c
> @@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]