mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 02:10:09 +01:00
core/dns: emit CONFIG_CHANGED signal even if caching
With systemd-resolved, NetworkManager considers `/etc/resolv.conf`
unmanaged. This breaks hostname lookups in a subtle way: when a new
connection comes online, NM will initiate the hostname lookup *before*
propagating DNS updates to systemd-resolved, which of course will cause
the request to fail. And because NM doesn't update `/etc/resolv.conf`,
it doesn't emit a `CONFIG_CHANGED` signal which would've restarted the
lookup.
Fix this by emitting a signal also when using a caching DNS plugin.
https://bugzilla.redhat.com/show_bug.cgi?id=1933863
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/770
(cherry picked from commit 1c0932a6e6)
This commit is contained in:
parent
a1223606fb
commit
53473d0b79
1 changed files with 2 additions and 2 deletions
|
|
@ -1815,8 +1815,8 @@ plugin_skip:;
|
|||
NM_DNS_MANAGER_RESOLV_CONF_MAN_UNMANAGED);
|
||||
}
|
||||
|
||||
/* signal that resolv.conf was changed */
|
||||
if (do_update && result == SR_SUCCESS)
|
||||
/* signal that DNS resolution configs were changed */
|
||||
if ((do_update || caching) && result == SR_SUCCESS)
|
||||
g_signal_emit(self, signals[CONFIG_CHANGED], 0);
|
||||
|
||||
nm_clear_pointer(&priv->config_variant, g_variant_unref);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue