summaryrefslogtreecommitdiff
path: root/src/ppp-manager/nm-ppp-manager.c
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2016-04-07 23:24:14 +0200
committerThomas Haller <thaller@redhat.com>2016-04-08 11:08:54 +0200
commit76309ebe79f5927f1e6dae80249ca90eef73d32b (patch)
treed3439264167f41df6ea5971784e46528584c6e57 /src/ppp-manager/nm-ppp-manager.c
parent8f8bf0d3153506ce0a755b92d24b11f8d124c222 (diff)
ppp-manager: don't modify the applied connection
The applied connection must not be modified during the activation. If the PPP setting needs to be changed when activating a PPPoE connection, make a copy to prevent the following error: could not get secrets: GDBus.Error:org.freedesktop.NetworkManager.Settings.Failed: The connection was modified since activation https://bugzilla.redhat.com/show_bug.cgi?id=1324895
Diffstat (limited to 'src/ppp-manager/nm-ppp-manager.c')
-rw-r--r--src/ppp-manager/nm-ppp-manager.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c
index 16e34f11e..18a28690e 100644
--- a/src/ppp-manager/nm-ppp-manager.c
+++ b/src/ppp-manager/nm-ppp-manager.c
@@ -1064,8 +1064,14 @@ nm_ppp_manager_start (NMPPPManager *manager,
}
pppoe_setting = nm_connection_get_setting_pppoe (connection);
- if (pppoe_setting)
+ if (pppoe_setting) {
+ /* We can't modify the applied connection's setting, make a copy */
+ if (!s_ppp_created) {
+ s_ppp = NM_SETTING_PPP (nm_setting_duplicate ((NMSetting *) s_ppp));
+ s_ppp_created = TRUE;
+ }
pppoe_fill_defaults (s_ppp);
+ }
adsl_setting = (NMSettingAdsl *) nm_connection_get_setting (connection, NM_TYPE_SETTING_ADSL);