[network-manager-applet/nma-0-9-10] editor: properly validate 'Primary' entry on bond page (as an interface name)
- From: Jiří Klimeš <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/nma-0-9-10] editor: properly validate 'Primary' entry on bond page (as an interface name)
- Date: Mon, 25 May 2015 08:08:06 +0000 (UTC)
commit 4abc881c2cf5e551380428e7b3bbd9c4c40dd651
Author: Jiří Klimeš <jklimes redhat com>
Date: Mon May 25 09:24:45 2015 +0200
editor: properly validate 'Primary' entry on bond page (as an interface name)
(cherry picked from commit 0f393521b851f1a9e185037fbdaa10482886cb34)
src/connection-editor/page-bond.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/connection-editor/page-bond.c b/src/connection-editor/page-bond.c
index 718a398..c090cfa 100644
--- a/src/connection-editor/page-bond.c
+++ b/src/connection-editor/page-bond.c
@@ -536,10 +536,15 @@ validate (CEPage *page, NMConnection *connection, GError **error)
{
CEPageBond *self = CE_PAGE_BOND (page);
CEPageBondPrivate *priv = CE_PAGE_BOND_GET_PRIVATE (self);
+ const char *primary;
if (!CE_PAGE_CLASS (ce_page_bond_parent_class)->validate (page, connection, error))
return FALSE;
+ primary = gtk_entry_get_text (priv->primary);
+ if (primary && *primary && !nm_utils_iface_valid_name (primary))
+ 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]