From ae879bdebac9e30cb44fff3cb580e4b4da2fda9c Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Thu, 7 Apr 2016 23:24:14 +0200 Subject: [PATCH] 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 (cherry picked from commit 76309ebe79f5927f1e6dae80249ca90eef73d32b) --- src/ppp-manager/nm-ppp-manager.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c index 16e34f11e5..18a28690e0 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);