2008-06-06 Dan Williams <dcbw@redhat.com>
Patch from Tambet Ingo <tambet@gmail.com> * src/NetworkManagerSystem.c src/NetworkManagerSystem.h - (nm_system_device_add_ip4_route_via_device_with_iface): remove - (nm_system_device_set_from_ip4_config): remove unused route_to_iface - (nm_system_device_set_ip4_route): clean up - (nm_system_vpn_device_set_from_ip4_config): clean up, add VPN routes * src/nm-device.c - (nm_device_set_ip4_config): remove unused route_to_iface bits * src/vpn-manager/nm-vpn-connection.c - (ip_address_to_string): new function - (print_vpn_config): use ip_address_to_string - (merge_vpn_routes): add user-defined routes to the ip4 config - (nm_vpn_connection_ip4_config_get): add routes the VPN server sent * include/NetworkManagerVPN.h - Add 'routes' key git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3728 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1355,7 +1355,6 @@ nm_device_set_ip4_config (NMDevice *self, NMIP4Config *config)
|
||||
{
|
||||
NMDevicePrivate *priv;
|
||||
const char *ip_iface;
|
||||
gboolean route_to_iface;
|
||||
gboolean success;
|
||||
|
||||
g_return_val_if_fail (NM_IS_DEVICE (self), FALSE);
|
||||
@@ -1381,16 +1380,7 @@ nm_device_set_ip4_config (NMDevice *self, NMIP4Config *config)
|
||||
|
||||
ip_iface = nm_device_get_ip_iface (self);
|
||||
|
||||
/* FIXME: Not sure if the following makes any sense. */
|
||||
/* If iface and ip_iface are the same, it's a regular network device and we
|
||||
treat it as such. However, if they differ, it's most likely something like
|
||||
a serial device with ppp interface, so route all the traffic to it. */
|
||||
if (strcmp (ip_iface, nm_device_get_iface (self)))
|
||||
route_to_iface = TRUE;
|
||||
else
|
||||
route_to_iface = FALSE;
|
||||
|
||||
success = nm_system_device_set_from_ip4_config (ip_iface, config, route_to_iface);
|
||||
success = nm_system_device_set_from_ip4_config (ip_iface, config);
|
||||
if (success) {
|
||||
nm_device_update_ip4_address (self);
|
||||
nm_system_set_hostname (config);
|
||||
|
Reference in New Issue
Block a user