mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-31 09:00:13 +01:00
dns: sort the ip-data list when a new element is added
In nm_dns_manager_set_ip_config() we try to avoid calling update_dns() unless something changes, because updating DNS is expensive and can trigger other actions such as a new hostname resolution. When we add a new ip_data, even if the new element is equivalent to the old one that was removed, we need to sort the list again. Fixes:ce0a36d20f('dns: better track l3cd changes') https://bugzilla.redhat.com/show_bug.cgi?id=2098574 (cherry picked from commit3cc7801779)
This commit is contained in:
parent
01b4040a7a
commit
db4c55c8d3
1 changed files with 1 additions and 0 deletions
|
|
@ -2039,6 +2039,7 @@ nm_dns_manager_set_ip_config(NMDnsManager *self,
|
|||
|
||||
if (!ip_data) {
|
||||
ip_data = _dns_config_ip_data_new(data, addr_family, source_tag, l3cd, ip_config_type);
|
||||
priv->ip_data_lst_need_sort = TRUE;
|
||||
if (!any_removed) {
|
||||
/* `any_removed` tracks whether we deleted any ip_data. If that happened,
|
||||
* we already compared the old and new l3cds and set `changed` accordingly.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue