From e92639d89c693f4ebf9b5ff9b7a257fcbbdb2bf7 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 11 Apr 2022 11:41:39 +0200 Subject: [PATCH] platform: ensure the platform cache is up to date during nm_platform_ip_address_sync() Since commit 528a63d9cc4d ('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: 528a63d9cc4d ('platform: avoid unnecessary configuration of IP address in nm_platform_ip_address_sync()') (cherry picked from commit 7f427ac4e6711fafaee5a3ab76a006f92e122b00) --- src/libnm-platform/nm-platform.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libnm-platform/nm-platform.c b/src/libnm-platform/nm-platform.c index 84345b3c91..533280fec3 100644 --- a/src/libnm-platform/nm-platform.c +++ b/src/libnm-platform/nm-platform.c @@ -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. */