2005-07-05 Robert Love <rml@novell.com>
* src/NetworkManagerSystem.c: bail out if asked to set a gateway of zero. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@782 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2005-07-05 Robert Love <rml@novell.com>
|
||||
|
||||
* src/NetworkManagerSystem.c: bail out if asked to set a gateway of
|
||||
zero.
|
||||
|
||||
2005-07-05 Robert Love <rml@novell.com>
|
||||
|
||||
* src/NetworkManagerDevice.c: use link-local (autoip) on DHCP failure
|
||||
|
@@ -732,6 +732,14 @@ static gboolean nm_system_device_set_ip4_route_with_iface (NMDevice *dev, const
|
||||
|
||||
g_return_val_if_fail (iface != NULL, FALSE);
|
||||
|
||||
/*
|
||||
* Zero is not a legal gateway and the ioctl will fail. But zero is a
|
||||
* way of saying "no route" so we just return here. Hopefully the
|
||||
* caller flushed the routes, first.
|
||||
*/
|
||||
if (ip4_gateway == 0)
|
||||
return TRUE;
|
||||
|
||||
if ((sk = nm_dev_sock_open (dev, NETWORK_CONTROL, __FUNCTION__, NULL)) == NULL)
|
||||
return FALSE;
|
||||
|
||||
|
Reference in New Issue
Block a user