mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 12:28:11 +02:00
policy: log policy's orig_hostname
This commit is contained in:
parent
25c5a96da7
commit
af5b86aa1e
2 changed files with 8 additions and 4 deletions
|
|
@ -1435,6 +1435,7 @@ nm_dns_manager_set_initial_hostname (NMDnsManager *self,
|
||||||
{
|
{
|
||||||
NMDnsManagerPrivate *priv = NM_DNS_MANAGER_GET_PRIVATE (self);
|
NMDnsManagerPrivate *priv = NM_DNS_MANAGER_GET_PRIVATE (self);
|
||||||
|
|
||||||
|
g_free (priv->hostname);
|
||||||
priv->hostname = g_strdup (hostname);
|
priv->hostname = g_strdup (hostname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -629,13 +629,14 @@ update_system_hostname (NMPolicy *self, NMDevice *best4, NMDevice *best6, const
|
||||||
temp_hostname);
|
temp_hostname);
|
||||||
priv->dhcp_hostname = FALSE;
|
priv->dhcp_hostname = FALSE;
|
||||||
|
|
||||||
|
if (!nm_utils_is_specific_hostname (temp_hostname))
|
||||||
|
nm_clear_g_free (&temp_hostname);
|
||||||
if (!nm_streq0 (temp_hostname, priv->orig_hostname)) {
|
if (!nm_streq0 (temp_hostname, priv->orig_hostname)) {
|
||||||
/* Update original (fallback) hostname */
|
/* Update original (fallback) hostname */
|
||||||
g_free (priv->orig_hostname);
|
g_free (priv->orig_hostname);
|
||||||
if (nm_utils_is_specific_hostname (temp_hostname))
|
priv->orig_hostname = g_steal_pointer (&temp_hostname);
|
||||||
priv->orig_hostname = g_steal_pointer (&temp_hostname);
|
_LOGT (LOGD_DNS, "hostname-original: update to %s%s%s",
|
||||||
else
|
NM_PRINT_FMT_QUOTE_STRING (priv->orig_hostname));
|
||||||
priv->orig_hostname = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2347,6 +2348,8 @@ constructed (GObject *object)
|
||||||
if (nm_utils_is_specific_hostname (hostname))
|
if (nm_utils_is_specific_hostname (hostname))
|
||||||
priv->orig_hostname = g_strdup (hostname);
|
priv->orig_hostname = g_strdup (hostname);
|
||||||
}
|
}
|
||||||
|
_LOGT (LOGD_DNS, "hostname-original: set to %s%s%s",
|
||||||
|
NM_PRINT_FMT_QUOTE_STRING (priv->orig_hostname));
|
||||||
|
|
||||||
priv->firewall_manager = g_object_ref (nm_firewall_manager_get ());
|
priv->firewall_manager = g_object_ref (nm_firewall_manager_get ());
|
||||||
g_signal_connect (priv->firewall_manager, NM_FIREWALL_MANAGER_STATE_CHANGED,
|
g_signal_connect (priv->firewall_manager, NM_FIREWALL_MANAGER_STATE_CHANGED,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue