mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-06 21:00:32 +01:00
policy: don't cache "(none)" hostname on startup (rh #706094)
This commit is contained in:
parent
19019a8e0b
commit
9eaf31f49a
1 changed files with 4 additions and 1 deletions
|
|
@ -1172,7 +1172,10 @@ nm_policy_new (NMManager *manager,
|
|||
memset (hostname, 0, sizeof (hostname));
|
||||
if (gethostname (&hostname[0], HOST_NAME_MAX) == 0) {
|
||||
/* only cache it if it's a valid hostname */
|
||||
if (strlen (hostname) && strcmp (hostname, "localhost") && strcmp (hostname, "localhost.localdomain"))
|
||||
if ( strlen (hostname)
|
||||
&& strcmp (hostname, "localhost")
|
||||
&& strcmp (hostname, "localhost.localdomain")
|
||||
&& strcmp (hostname, "(none)"))
|
||||
policy->orig_hostname = g_strdup (hostname);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue