From 8bdf070ff046f482f6eb5e2b15ebc216f5d1e3da Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 12 Feb 2025 13:46:50 +0100 Subject: New upstream version 1.51.90 --- src/core/nm-policy.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/core/nm-policy.c') 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, -- cgit 1.3.0-6-gf8a5