diff options
Diffstat (limited to 'src/core/nm-policy.c')
| -rw-r--r-- | src/core/nm-policy.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/nm-policy.c b/src/core/nm-policy.c index 05d4d006..f86d8115 100644 --- a/src/core/nm-policy.c +++ b/src/core/nm-policy.c @@ -824,7 +824,7 @@ build_device_hostname_infos(NMPolicy *self) array = g_array_sized_new(FALSE, FALSE, sizeof(DeviceHostnameInfo), 4); info = nm_g_array_append_new(array, DeviceHostnameInfo); - *info = (DeviceHostnameInfo){ + *info = (DeviceHostnameInfo) { .device = device, .priority = device_get_hostname_priority(device), .from_dhcp = @@ -2448,6 +2448,10 @@ device_l3cd_changed(NMDevice *device, */ state = nm_device_get_state(device); if (l3cd_new && state >= NM_DEVICE_STATE_IP_CONFIG && state < NM_DEVICE_STATE_DEACTIVATING) { + /* Since the device L3CD_CHANGED signal is emitted *after* the commit of + * configuration, addresses and routes are already set in kernel when we + * write the configuration to resolv.conf or send it to the DNS plugin. + * This prevents "leaks" of DNS queries via the wrong routes.*/ nm_dns_manager_set_ip_config(priv->dns_manager, AF_UNSPEC, device, |