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:
Robert Love
2005-07-05 15:06:48 +00:00
committed by Robert Love
parent 94f05a42d2
commit 35d4811ae4
2 changed files with 13 additions and 0 deletions

View File

@@ -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> 2005-07-05 Robert Love <rml@novell.com>
* src/NetworkManagerDevice.c: use link-local (autoip) on DHCP failure * src/NetworkManagerDevice.c: use link-local (autoip) on DHCP failure

View File

@@ -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); 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) if ((sk = nm_dev_sock_open (dev, NETWORK_CONTROL, __FUNCTION__, NULL)) == NULL)
return FALSE; return FALSE;