2006-06-09 Dan Williams <dcbw@redhat.com>

* src/NetworkManagerSystem.[ch]
		- (nm_system_device_set_up_down_with_iface): remove 'dev' argument,
			it was unused and pointless
		- (nm_system_vpn_device_set_from_iface, nm_system_device_set_up_down):
			fix for set_up_down_with_iface change

	* src/vpn-manager/nm-vpn-connection.c
		- (nm_vpn_connection_deactivate): fix for set_up_down_with_iface change

	* src/backends/NetworkManagerPaldo.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSuSE.c
	  src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerGentoo.c
		- (nm_system_enable_loopback): use set_up_down_with_iface where
			appropriate
		- (nm_system_flush_loopback_routes): use flush_routes_with_iface
			where appropriate


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1817 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2006-06-09 14:24:19 +00:00
parent 05dbe5238c
commit 768354a19c
11 changed files with 38 additions and 21 deletions

View File

@@ -1,3 +1,25 @@
2006-06-09 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerSystem.[ch]
- (nm_system_device_set_up_down_with_iface): remove 'dev' argument,
it was unused and pointless
- (nm_system_vpn_device_set_from_iface, nm_system_device_set_up_down):
fix for set_up_down_with_iface change
* src/vpn-manager/nm-vpn-connection.c
- (nm_vpn_connection_deactivate): fix for set_up_down_with_iface change
* src/backends/NetworkManagerPaldo.c
src/backends/NetworkManagerRedHat.c
src/backends/NetworkManagerSuSE.c
src/backends/NetworkManagerArch.c
src/backends/NetworkManagerDebian.c
src/backends/NetworkManagerGentoo.c
- (nm_system_enable_loopback): use set_up_down_with_iface where
appropriate
- (nm_system_flush_loopback_routes): use flush_routes_with_iface
where appropriate
2006-06-09 Dan Williams <dcbw@redhat.com>
Patch from Peter Jones:

View File

@@ -417,7 +417,7 @@ gboolean nm_system_vpn_device_set_from_ip4_config (NMNamedManager *named, NMDevi
if (iface != NULL && strlen (iface))
{
nm_system_device_set_up_down_with_iface (NULL, iface, TRUE);
nm_system_device_set_up_down_with_iface (iface, TRUE);
nlh = new_nl_handle ();
@@ -514,10 +514,10 @@ gboolean nm_system_device_set_up_down (NMDevice *dev, gboolean up)
{
g_return_val_if_fail (dev != NULL, FALSE);
return nm_system_device_set_up_down_with_iface (dev, nm_device_get_iface (dev), up);
return nm_system_device_set_up_down_with_iface (nm_device_get_iface (dev), up);
}
gboolean nm_system_device_set_up_down_with_iface (NMDevice *dev, const char *iface, gboolean up)
gboolean nm_system_device_set_up_down_with_iface (const char *iface, gboolean up)
{
gboolean success = FALSE;
struct nl_handle * nlh = NULL;

View File

@@ -72,7 +72,7 @@ gboolean nm_system_vpn_device_set_from_ip4_config (NMNamedManager *named, NMDev
gboolean nm_system_vpn_device_unset_from_ip4_config (NMNamedManager *named, NMDevice *active_device, const char *iface, NMIP4Config *config);
gboolean nm_system_device_set_up_down (NMDevice *dev, gboolean up);
gboolean nm_system_device_set_up_down_with_iface (NMDevice *dev, const char *iface, gboolean up);
gboolean nm_system_device_set_up_down_with_iface (const char *iface, gboolean up);
gboolean nm_system_device_update_resolv_conf (void *data, int len, const char *domain_name);

View File

@@ -302,7 +302,7 @@ gboolean nm_system_device_setup_static_ip4_config (NMDevice *dev)
*/
void nm_system_enable_loopback (void)
{
nm_spawn_process ("/sbin/ifconfig lo up");
nm_system_device_set_up_down_with_iface ("lo", TRUE);
}
@@ -315,7 +315,7 @@ void nm_system_enable_loopback (void)
*/
void nm_system_flush_loopback_routes (void)
{
nm_spawn_process ("/usr/sbin/ip route flush dev lo");
nm_system_device_flush_routes_with_iface ("lo");
}

View File

@@ -195,7 +195,7 @@ void nm_system_enable_loopback (void)
*/
void nm_system_flush_loopback_routes (void)
{
nm_spawn_process ("/sbin/ip route flush dev lo");
nm_system_device_flush_routes_with_iface ("lo");
}

View File

@@ -184,8 +184,7 @@ void nm_system_enable_loopback (void)
*/
void nm_system_flush_loopback_routes (void)
{
/* Remove routing table entries for lo */
nm_spawn_process ("/sbin/ip route flush dev lo");
nm_system_device_flush_routes_with_iface ("lo");
}
/*

View File

@@ -195,7 +195,7 @@ void nm_system_device_flush_addresses_with_iface (const char *iface)
*/
void nm_system_enable_loopback (void)
{
nm_spawn_process ("/sbin/ip link set dev lo up");
nm_system_device_set_up_down_with_iface ("lo", TRUE);
nm_spawn_process ("/sbin/ip addr add 127.0.0.1/8 brd 127.255.255.255 dev lo scope host label loopback");
}
@@ -209,8 +209,7 @@ void nm_system_enable_loopback (void)
*/
void nm_system_flush_loopback_routes (void)
{
/* Remove routing table entries for lo */
nm_spawn_process ("/sbin/ip route flush dev lo");
nm_system_device_flush_routes_with_iface ("lo");
}

View File

@@ -209,7 +209,7 @@ void nm_system_device_flush_addresses_with_iface (const char *iface)
*/
void nm_system_enable_loopback (void)
{
nm_spawn_process ("/sbin/ip link set dev lo up");
nm_system_device_set_up_down_with_iface ("lo", TRUE);
nm_spawn_process ("/sbin/ip addr add 127.0.0.1/8 brd 127.255.255.255 dev lo scope host label loopback");
}
@@ -223,8 +223,7 @@ void nm_system_enable_loopback (void)
*/
void nm_system_flush_loopback_routes (void)
{
/* Remove routing table entries for lo */
nm_spawn_process ("/sbin/ip route flush dev lo");
nm_system_device_flush_routes_with_iface ("lo");
}

View File

@@ -312,8 +312,7 @@ void nm_system_device_add_default_route_via_device_with_iface (const char *iface
*/
void nm_system_flush_loopback_routes (void)
{
/* Remove routing table entries for lo */
nm_spawn_process ("/sbin/ip route flush dev lo");
nm_system_device_flush_routes_with_iface ("lo");
}

View File

@@ -214,7 +214,7 @@ void nm_system_device_flush_addresses_with_iface (const char *iface)
*/
void nm_system_enable_loopback (void)
{
nm_spawn_process ("/sbin/ip link set dev lo up");
nm_system_device_set_up_down_with_iface ("lo", TRUE);
nm_spawn_process ("/sbin/ip addr add 127.0.0.1/8 brd 127.255.255.255 dev lo scope host label loopback");
}
@@ -228,8 +228,7 @@ void nm_system_enable_loopback (void)
*/
void nm_system_flush_loopback_routes (void)
{
/* Remove routing table entries for lo */
nm_spawn_process ("/sbin/ip route flush dev lo");
nm_system_device_flush_routes_with_iface ("lo");
}

View File

@@ -149,7 +149,7 @@ void nm_vpn_connection_deactivate (NMVPNConnection *connection)
if (connection->vpn_iface)
{
nm_system_device_set_up_down_with_iface (NULL, connection->vpn_iface, FALSE);
nm_system_device_set_up_down_with_iface (connection->vpn_iface, FALSE);
nm_system_device_flush_routes_with_iface (connection->vpn_iface);
nm_system_device_flush_addresses_with_iface (connection->vpn_iface);
}