diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2016-12-19 11:22:00 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2016-12-21 09:37:22 +0100 |
commit | 30a1e17cc032676cdfb04e2abcfab9db0d0cf085 (patch) | |
tree | 8e4f7c04040a324a613f6d4da700f929cca23420 | |
parent | 0c5aa6e48b713a5626c20303c683f7d96ee13184 (diff) |
policy: don't apply DNS configuration for non-active devices
Don't apply DNS configuration of non-active devices (for example
unmanaged ones which have a non-empty DNS configuration read from a
DHCP lease).
https://bugzilla.redhat.com/show_bug.cgi?id=1405431
-rw-r--r-- | src/nm-policy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nm-policy.c b/src/nm-policy.c index 5b53f8a1ed..266bc5b1c4 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -1607,7 +1607,7 @@ device_ip4_config_changed (NMDevice *device, * catch all the changes when the device moves to 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_ip4_config (priv->dns_manager, old_config); |