summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-07-11 13:08:52 +0200
committerThomas Haller <thaller@redhat.com>2019-07-16 12:35:36 +0200
commitb52b51e3dbdab479d336490f4c04ca843f91b9ba (patch)
tree7436175af6beb33b95b415ad9f167556f269ff38
parenta33e602a239c6109d3521891b24572fff6f117e7 (diff)
downloadNetworkManager-b52b51e3dbdab479d336490f4c04ca843f91b9ba.tar.gz
core: reapply changes to profile to all devices
Profiles can now be "connection.multi-connect" multiple, so we should look at all devices.
-rw-r--r--src/nm-policy.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/nm-policy.c b/src/nm-policy.c
index 9d5b027c28..affd541303 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -2404,22 +2404,17 @@ connection_updated (NMSettings *settings,
{
NMPolicyPrivate *priv = user_data;
NMPolicy *self = _PRIV_TO_SELF (priv);
- const CList *tmp_lst;
- NMDevice *device = NULL;
- NMDevice *dev;
if (by_user) {
+ const CList *tmp_lst;
+ NMDevice *device;
+
/* find device with given connection */
- nm_manager_for_each_device (priv->manager, dev, tmp_lst) {
- if (nm_device_get_settings_connection (dev) == connection) {
- device = dev;
- break;
- }
+ nm_manager_for_each_device (priv->manager, device, tmp_lst) {
+ if (nm_device_get_settings_connection (device) == connection)
+ nm_device_reapply_settings_immediately (device);
}
- if (device)
- nm_device_reapply_settings_immediately (device);
-
/* Reset auto retries back to default since connection was updated */
nm_settings_connection_autoconnect_retries_reset (connection);
}