platform: ensure the platform cache is up to date during nm_platform_ip_address_sync()

Since commit 528a63d9cc ('platform: avoid unnecessary configuration of
IP address in nm_platform_ip_address_sync()'), we no longer configure the
IP address if it is in the platform cache. But the cache might not be
up to date. Process any pending netlink events.

https://bugzilla.redhat.com/show_bug.cgi?id=2073926

Fixes: 528a63d9cc ('platform: avoid unnecessary configuration of IP address in nm_platform_ip_address_sync()')
(cherry picked from commit 7f427ac4e6)
This commit is contained in:
Thomas Haller 2022-04-11 11:41:39 +02:00
parent 202657c5d2
commit e92639d89c
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -4125,6 +4125,9 @@ nm_platform_ip_address_sync(NMPlatform *self,
}
}
/* ensure we have the platform cache up to date. */
nm_platform_process_events(self);
/* @plat_addresses for IPv6 must be sorted in decreasing priority order (highest priority addresses first).
* IPv4 are probably unsorted or sorted with lowest priority first, but their order doesn't matter because
* we check the "secondary" flag. */