summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Giudici <fgiudici@redhat.com>2017-03-03 18:03:47 +0100
committerFrancesco Giudici <fgiudici@redhat.com>2017-03-24 15:18:09 +0100
commit7c4bd15ec698e960593a18bf36c8288bb011ed93 (patch)
treea154cb02e7783691dc8d9f8c60f38a859144b797
parentd34add6f0074f58ad0a232038c8ea26c74970d03 (diff)
downloadNetworkManager-7c4bd15ec698e960593a18bf36c8288bb011ed93.tar.gz
policy: skip dns and route updates on ip6 config change signal if the device is not active
This pairs with commit 30a1e17cc032676cdfb04e2abcfab9db0d0cf085.
-rw-r--r--src/nm-policy.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nm-policy.c b/src/nm-policy.c
index 1a489d4445..2b71d13538 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -1693,8 +1693,9 @@ device_ip4_config_changed (NMDevice *device,
nm_dns_manager_begin_updates (priv->dns_manager, __func__);
- /* Ignore IP config changes while the device is activating, because we'll
- * catch all the changes when the device moves to ACTIVATED state.
+ /* We catch already all the IP events registering on the device state changes but
+ * the ones where the IP changes but the device state keep stable (i.e., activated):
+ * ignore IP config changes but when the device is in activated state.
* Prevents unecessary changes to DNS information.
*/
if (nm_device_get_state (device) == NM_DEVICE_STATE_ACTIVATED) {
@@ -1728,11 +1729,12 @@ device_ip6_config_changed (NMDevice *device,
nm_dns_manager_begin_updates (priv->dns_manager, __func__);
- /* Ignore IP config changes while the device is activating, because we'll
- * catch all the changes when the device moves to ACTIVATED state.
+ /* We catch already all the IP events registering on the device state changes but
+ * the ones where the IP changes but the device state keep stable (i.e., activated):
+ * ignore IP config changes but when the device is in activated state.
* Prevents unecessary changes to DNS information.
*/
- if (!nm_device_is_activating (device)) {
+ if (nm_device_get_state (device) == NM_DEVICE_STATE_ACTIVATED) {
if (old_config != new_config) {
if (old_config)
nm_dns_manager_remove_ip6_config (priv->dns_manager, old_config);