summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2015-08-24 16:54:25 +0200
committerJiří Klimeš <jklimes@redhat.com>2015-08-27 09:53:41 +0200
commitd66258a6fce6c9ffacda3be993abe688b77e9cec (patch)
tree9b48d0732790c1925c400bb0147cbbd6e1518279
parentf6fdb2a20ef1e91bcf39e836dc891e5fc0062b86 (diff)
downloadnetwork-manager-applet-d66258a6fce6c9ffacda3be993abe688b77e9cec.tar.gz
bond: fix setting MTU for bonds when it is 0 (automatic) (rh #1177860)
https://bugzilla.redhat.com/show_bug.cgi?id=1177860
-rw-r--r--src/connection-editor/page-bond.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/connection-editor/page-bond.c b/src/connection-editor/page-bond.c
index fd82e851..cb690266 100644
--- a/src/connection-editor/page-bond.c
+++ b/src/connection-editor/page-bond.c
@@ -545,13 +545,12 @@ ui_to_setting (CEPageBond *self)
g_free (targets);
mtu = gtk_spin_button_get_value_as_int (priv->mtu);
- if (mtu) {
- if (!priv->wired) {
- priv->wired = NM_SETTING_WIRED (nm_setting_wired_new ());
- nm_connection_add_setting (connection, NM_SETTING (priv->wired));
- }
- g_object_set (priv->wired, NM_SETTING_WIRED_MTU, mtu, NULL);
+ if (mtu && !priv->wired) {
+ priv->wired = NM_SETTING_WIRED (nm_setting_wired_new ());
+ nm_connection_add_setting (connection, NM_SETTING (priv->wired));
}
+ if (priv->wired)
+ g_object_set (priv->wired, NM_SETTING_WIRED_MTU, mtu, NULL);
}
static gboolean