2005-05-16 Dan Williams <dcbw@redhat.com>

Patch from Tomislav Vujec <tvujec@redhat.com>
	* gnome/applet/applet-dbus-info.c
		- (nmi_dbus_get_vpn_connection_routes): new function, pull routes out of
			GConf and pass them to NetworkManager.  New key is 'routes' under
			the VPN connection, and should be a string list

	* src/NetworkManagerSystem.c
		- (nm_system_vpn_device_set_from_ip4_config): if user-defined routes exist,
			set them on the device when we set the rest of the VPN config.  Ensure
			they are in the correct format since they are passed directly to the
			command line.

	* src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerDebian.c
		- (nm_system_device_add_route_via_device_with_iface): new function

	* src/vpn-manager/nm-dbus-vpn.c
		- (nm_dbus_vpn_get_routes): grab VPN routes from NetworkManagerInfo

	* src/vpn-manager/nm-vpn-manager.c
		- (nm_vpn_manager_handle_ip4_config_signal): grab routes from NMI and pass
			them into the IP4 config functions


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@637 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2005-05-16 12:57:08 +00:00
parent f872340719
commit bfd38e3af0
9 changed files with 337 additions and 5 deletions

View File

@@ -81,6 +81,25 @@ void nm_system_device_add_default_route_via_device_with_iface (const char *iface
g_free (buf);
}
/*
* nm_system_device_add_route_via_device_with_iface
*
* Add route to the given device
*
*/
void nm_system_device_add_route_via_device_with_iface (const char *iface, const char *route)
{
char *buf;
g_return_if_fail (iface != NULL);
/* Add default gateway */
buf = g_strdup_printf ("/sbin/ip route add %s dev %s", route, iface);
nm_spawn_process (buf);
g_free (buf);
}
/*
* nm_system_device_flush_addresses
*