mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 12:34:55 +00:00
2008-05-07 Tambet Ingo <tambet@gmail.com>
* src/backends/NetworkManagerSuSE.c (nm_system_set_hostname): Update for multiple IP addresses. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3639 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
bbaf9e2bfc
commit
97668fc7d6
|
@ -1,3 +1,8 @@
|
||||||
|
2008-05-07 Tambet Ingo <tambet@gmail.com>
|
||||||
|
|
||||||
|
* src/backends/NetworkManagerSuSE.c (nm_system_set_hostname): Update
|
||||||
|
for multiple IP addresses.
|
||||||
|
|
||||||
2008-05-07 Tambet Ingo <tambet@gmail.com>
|
2008-05-07 Tambet Ingo <tambet@gmail.com>
|
||||||
|
|
||||||
Patch from André Lemos.
|
Patch from André Lemos.
|
||||||
|
|
|
@ -327,9 +327,11 @@ void nm_system_set_hostname (NMIP4Config *config)
|
||||||
{
|
{
|
||||||
struct in_addr temp_addr;
|
struct in_addr temp_addr;
|
||||||
struct hostent *host;
|
struct hostent *host;
|
||||||
|
const NMSettingIP4Address *ip_address;
|
||||||
|
|
||||||
/* try to get hostname via dns */
|
/* 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);
|
host = gethostbyaddr ((char *) &temp_addr, sizeof (temp_addr), AF_INET);
|
||||||
if (host)
|
if (host)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue