mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-13 21:08:26 +02:00
ndisc: fix spurious DNS domains changed notification in clean_dns_domains()
clean_dns_domains() uses "i != 0" as the condition to set the changed
flag, but "i" is the total number of DNS domains (it equals
rdata->dns_domains->len after the loop). The correct condition is
"i != j", which is true only when some domains actually expired.
Without this fix, any cleanup cycle with at least one DNS domain
triggers a spurious NM_NDISC_CONFIG_DNS_DOMAINS change notification.
Fixes: 4c2035347e ('ndisc: track expiry of Router Advertisements in milliseconds')
This commit is contained in:
parent
60a1bd4e43
commit
f5127d7b14
1 changed files with 1 additions and 1 deletions
|
|
@ -1695,7 +1695,7 @@ clean_dns_domains(NMNDisc *ndisc, gint64 now_msec, NMNDiscConfigMap *changed, gi
|
|||
j++;
|
||||
}
|
||||
|
||||
if (i != 0) {
|
||||
if (i != j) {
|
||||
*changed |= NM_NDISC_CONFIG_DNS_DOMAINS;
|
||||
g_array_set_size(rdata->dns_domains, j);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue