From 30a1e17cc032676cdfb04e2abcfab9db0d0cf085 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 19 Dec 2016 11:22:00 +0100 Subject: [PATCH] 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 --- src/nm-policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);