summary refs log tree commit diff
path: root/src/core/nm-policy.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2025-02-12 13:46:50 +0100
committerMichael Biebl <biebl@debian.org>2025-02-12 13:46:50 +0100
commit8bdf070ff046f482f6eb5e2b15ebc216f5d1e3da (patch)
treef706478d189d54c6532e8863d4b0d5ff5575af60 /src/core/nm-policy.c
parent818258cf34b83fbc754633295e1052d4752d7b15 (diff)
New upstream version 1.51.90 upstream/1.51.90
Diffstat (limited to 'src/core/nm-policy.c')
-rw-r--r--src/core/nm-policy.c6
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,