[network-manager-applet] editor: allow creating master bridge connections without slaves (rh #700948)
- From: Jiří Klimeš <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] editor: allow creating master bridge connections without slaves (rh #700948)
- Date: Thu, 24 Oct 2013 08:58:11 +0000 (UTC)
commit 66a24f81d93be49d69041632924a2ce90013fa99
Author: Jiří Klimeš <jklimes redhat com>
Date: Tue Oct 22 10:19:52 2013 +0200
editor: allow creating master bridge connections without slaves (rh #700948)
Such bridges are useful e.g. for virtualization.
https://bugzilla.gnome.org/show_bug.cgi?id=700948
src/connection-editor/page-bond.c | 4 ++++
src/connection-editor/page-master.c | 7 ++-----
src/connection-editor/page-team.c | 4 ++++
3 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/connection-editor/page-bond.c b/src/connection-editor/page-bond.c
index cf6abc3..9c2c889 100644
--- a/src/connection-editor/page-bond.c
+++ b/src/connection-editor/page-bond.c
@@ -537,6 +537,10 @@ validate (CEPage *page, NMConnection *connection, GError **error)
if (!CE_PAGE_CLASS (ce_page_bond_parent_class)->validate (page, connection, error))
return FALSE;
+ /* Need at least one slave connection */
+ if (!ce_page_master_has_slaves (CE_PAGE_MASTER (page)))
+ return FALSE;
+
ui_to_setting (self);
return nm_setting_verify (NM_SETTING (priv->setting), NULL, error);
}
diff --git a/src/connection-editor/page-master.c b/src/connection-editor/page-master.c
index 76d320b..be2ee0c 100644
--- a/src/connection-editor/page-master.c
+++ b/src/connection-editor/page-master.c
@@ -498,12 +498,9 @@ validate (CEPage *page, NMConnection *connection, GError **error)
{
CEPageMaster *self = CE_PAGE_MASTER (page);
- /* Need at least one slave connection; we don't need to
- * recursively check that the connections are valid because they
- * can't end up in the table if they're not.
+ /* We don't need to recursively check that the slaves connections
+ * are valid because they can't end up in the table if they're not.
*/
- if (!ce_page_master_has_slaves (self))
- return FALSE;
ui_to_setting (self);
diff --git a/src/connection-editor/page-team.c b/src/connection-editor/page-team.c
index bbae0bf..9b2e0f5 100644
--- a/src/connection-editor/page-team.c
+++ b/src/connection-editor/page-team.c
@@ -303,6 +303,10 @@ validate (CEPage *page, NMConnection *connection, GError **error)
if (!CE_PAGE_CLASS (ce_page_team_parent_class)->validate (page, connection, error))
return FALSE;
+ /* Need at least one slave connection */
+ if (!ce_page_master_has_slaves (CE_PAGE_MASTER (page)))
+ return FALSE;
+
ui_to_setting (self);
return nm_setting_verify (NM_SETTING (priv->setting), NULL, error);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]