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:
Robert Love 2005-12-07 17:55:39 +00:00 committed by Robert Love
parent eff693f386
commit 91b74775a5
2 changed files with 19 additions and 5 deletions

View file

@ -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_*

View file

@ -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;
}