l3cfg: refresh platform cache before creating prune list during L3Cfg commit

It seems, we should make decisions based on the latest state.
Make sure to process all pending netlink events.

(cherry picked from commit 9a69bc8d84)
(cherry picked from commit 1b9dfd3001)
This commit is contained in:
Thomas Haller 2022-05-05 17:24:48 +02:00
parent 75c87d18ec
commit d785233fcc
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -4223,6 +4223,8 @@ _l3_commit_one(NML3Cfg *self,
if (commit_type == NM_L3_CFG_COMMIT_TYPE_REAPPLY) {
gs_unref_array GArray *ipv6_temp_addrs_keep = NULL;
nm_platform_process_events(self->priv.platform);
if (!IS_IPv4 && addresses) {
for (i = 0; i < addresses->len; i++) {
const NMPlatformIP6Address *addr = NMP_OBJECT_CAST_IP6_ADDRESS(addresses->pdata[i]);