From a1fae0286ac152ced1188a25383adaf31cef8e99 Mon Sep 17 00:00:00 2001 From: Tomas Korbar Date: Mon, 1 Sep 2025 11:03:31 +0200 Subject: [PATCH] dns: Clear update_pending flag of dns-mgr on update timeout Even if the first dns update times out, allow the next one 5 seconds to be finished again. --- src/core/dns/nm-dns-manager.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/dns/nm-dns-manager.c b/src/core/dns/nm-dns-manager.c index 4ce466e1ce..05d1fac12b 100644 --- a/src/core/dns/nm-dns-manager.c +++ b/src/core/dns/nm-dns-manager.c @@ -191,6 +191,9 @@ _update_pending_unblock_cb(gpointer user_data) _LOGW( "update-pending changed: DNS plugin did not become ready again. Assume something is wrong"); + /* If previous update left this field as TRUE and we have to clear it, so the next + * update is again allowed the 5 seconds timeout */ + priv->update_pending = FALSE; _notify(self, PROP_UPDATE_PENDING); return G_SOURCE_CONTINUE; } @@ -232,7 +235,6 @@ nm_dns_manager_get_update_pending(NMDnsManager *self) g_return_val_if_fail(NM_IS_DNS_MANAGER(self), FALSE); priv = NM_DNS_MANAGER_GET_PRIVATE(self); - nm_assert(priv->update_pending == _update_pending_detect(self)); nm_assert(priv->update_pending || !priv->update_pending_unblock); /* update-pending can only be TRUE for a certain time (before we assume