From ddaee5d7e6bff2aaa48d0a595805ce6d3f5cd493 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Thu, 20 Jan 2022 15:25:50 +0100 Subject: [PATCH] core: update hostname once at startup NMPolicy stores the last hostname set in priv->cur_hostname and checks if it changed before notifying the DNS manager. _set_hostname() should be called one time early during startup so that the priv->cur_hostname gets initialized without triggering a DNS update. --- src/core/nm-policy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/nm-policy.c b/src/core/nm-policy.c index dcb951af4d..cb5b543e9d 100644 --- a/src/core/nm-policy.c +++ b/src/core/nm-policy.c @@ -2820,6 +2820,7 @@ constructed(GObject *object) G_OBJECT_CLASS(nm_policy_parent_class)->constructed(object); _LOGD(LOGD_DNS, "hostname-mode: %s", _hostname_mode_to_string(priv->hostname_mode)); + update_system_hostname(self, "initial hostname"); } NMPolicy *