mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-03 20:40:34 +01:00
2005-12-07 Robert Love <rml@novell.com>
* src/backends/NetworkManagerSuSE.c: In static configurations, if the supplied IP is invalid, fall back to DHCP. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1143 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
eff693f386
commit
91b74775a5
2 changed files with 19 additions and 5 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2005-12-07 Robert Love <rml@novell.com>
|
||||
|
||||
* src/backends/NetworkManagerSuSE.c: In static configurations, if the
|
||||
supplied IP is invalid, fall back to DHCP.
|
||||
|
||||
2005-12-07 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* Convert NETWORK_MODE_* constants to IW_MODE_*
|
||||
|
|
|
|||
|
|
@ -494,16 +494,25 @@ found:
|
|||
|
||||
if (!(sys_data->use_dhcp))
|
||||
{
|
||||
if ((buf = svGetValue (file, "IPADDR")))
|
||||
buf = svGetValue (file, "IPADDR");
|
||||
if (buf)
|
||||
{
|
||||
nm_ip4_config_set_address (sys_data->config, inet_addr (buf));
|
||||
free (buf);
|
||||
in_addr_t ip;
|
||||
|
||||
ip = inet_addr (buf);
|
||||
if (ip != -1)
|
||||
nm_ip4_config_set_address (sys_data->config, ip);
|
||||
else
|
||||
error = TRUE;
|
||||
free (buf);
|
||||
}
|
||||
else
|
||||
error = TRUE;
|
||||
|
||||
if (error)
|
||||
{
|
||||
nm_warning ("Network configuration for device '%s' was invalid: Non-DHCP configuration, "
|
||||
"but no IP address specified. Will use DHCP instead.", nm_device_get_iface (dev));
|
||||
error = TRUE;
|
||||
"but no IP address specified. Will use DHCP instead.", nm_device_get_iface (dev));
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue