diff options
Diffstat (limited to 'src/backends')
-rw-r--r-- | src/backends/NetworkManagerSuSE.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backends/NetworkManagerSuSE.c b/src/backends/NetworkManagerSuSE.c index effc785188..384ac6491b 100644 --- a/src/backends/NetworkManagerSuSE.c +++ b/src/backends/NetworkManagerSuSE.c @@ -327,9 +327,11 @@ void nm_system_set_hostname (NMIP4Config *config) { struct in_addr temp_addr; struct hostent *host; + const NMSettingIP4Address *ip_address; /* try to get hostname via dns */ - temp_addr.s_addr = nm_ip4_config_get_address (config); + ip_address = nm_ip4_config_get_address (config, 0); + temp_addr.s_addr = ip_address->address; host = gethostbyaddr ((char *) &temp_addr, sizeof (temp_addr), AF_INET); if (host) { |