ndisc: fix clean_addresses() overwriting previously accumulated changed flags

clean_addresses() uses "=" instead of "|=" when setting the changed
flags, which overwrites any flags set by previous cleanup functions
(e.g. clean_gateways()). This can cause gateway change notifications
to be lost when gateways and addresses expire at the same time.

Fixes: 4c2035347e ('ndisc: track expiry of Router Advertisements in milliseconds')
This commit is contained in:
Beniamino Galvani 2026-05-22 14:35:55 +02:00
parent 97282d1e50
commit 60a1bd4e43

View file

@ -1562,7 +1562,7 @@ clean_addresses(NMNDisc *ndisc, gint64 now_msec, NMNDiscConfigMap *changed, gint
}
if (i != j) {
*changed = NM_NDISC_CONFIG_ADDRESSES;
*changed |= NM_NDISC_CONFIG_ADDRESSES;
g_array_set_size(rdata->addresses, j);
}