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:
22
ChangeLog
22
ChangeLog
@@ -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>
|
2006-06-09 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
Patch from Peter Jones:
|
Patch from Peter Jones:
|
||||||
|
@@ -417,7 +417,7 @@ gboolean nm_system_vpn_device_set_from_ip4_config (NMNamedManager *named, NMDevi
|
|||||||
|
|
||||||
if (iface != NULL && strlen (iface))
|
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 ();
|
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);
|
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;
|
gboolean success = FALSE;
|
||||||
struct nl_handle * nlh = NULL;
|
struct nl_handle * nlh = NULL;
|
||||||
|
@@ -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_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 (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);
|
gboolean nm_system_device_update_resolv_conf (void *data, int len, const char *domain_name);
|
||||||
|
|
||||||
|
@@ -302,7 +302,7 @@ gboolean nm_system_device_setup_static_ip4_config (NMDevice *dev)
|
|||||||
*/
|
*/
|
||||||
void nm_system_enable_loopback (void)
|
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)
|
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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -195,7 +195,7 @@ void nm_system_enable_loopback (void)
|
|||||||
*/
|
*/
|
||||||
void nm_system_flush_loopback_routes (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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -184,8 +184,7 @@ void nm_system_enable_loopback (void)
|
|||||||
*/
|
*/
|
||||||
void nm_system_flush_loopback_routes (void)
|
void nm_system_flush_loopback_routes (void)
|
||||||
{
|
{
|
||||||
/* Remove routing table entries for lo */
|
nm_system_device_flush_routes_with_iface ("lo");
|
||||||
nm_spawn_process ("/sbin/ip route flush dev lo");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -195,7 +195,7 @@ void nm_system_device_flush_addresses_with_iface (const char *iface)
|
|||||||
*/
|
*/
|
||||||
void nm_system_enable_loopback (void)
|
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");
|
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)
|
void nm_system_flush_loopback_routes (void)
|
||||||
{
|
{
|
||||||
/* Remove routing table entries for lo */
|
nm_system_device_flush_routes_with_iface ("lo");
|
||||||
nm_spawn_process ("/sbin/ip route flush dev lo");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -209,7 +209,7 @@ void nm_system_device_flush_addresses_with_iface (const char *iface)
|
|||||||
*/
|
*/
|
||||||
void nm_system_enable_loopback (void)
|
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");
|
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)
|
void nm_system_flush_loopback_routes (void)
|
||||||
{
|
{
|
||||||
/* Remove routing table entries for lo */
|
nm_system_device_flush_routes_with_iface ("lo");
|
||||||
nm_spawn_process ("/sbin/ip route flush dev lo");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -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)
|
void nm_system_flush_loopback_routes (void)
|
||||||
{
|
{
|
||||||
/* Remove routing table entries for lo */
|
nm_system_device_flush_routes_with_iface ("lo");
|
||||||
nm_spawn_process ("/sbin/ip route flush dev lo");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -214,7 +214,7 @@ void nm_system_device_flush_addresses_with_iface (const char *iface)
|
|||||||
*/
|
*/
|
||||||
void nm_system_enable_loopback (void)
|
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");
|
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)
|
void nm_system_flush_loopback_routes (void)
|
||||||
{
|
{
|
||||||
/* Remove routing table entries for lo */
|
nm_system_device_flush_routes_with_iface ("lo");
|
||||||
nm_spawn_process ("/sbin/ip route flush dev lo");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -149,7 +149,7 @@ void nm_vpn_connection_deactivate (NMVPNConnection *connection)
|
|||||||
|
|
||||||
if (connection->vpn_iface)
|
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_routes_with_iface (connection->vpn_iface);
|
||||||
nm_system_device_flush_addresses_with_iface (connection->vpn_iface);
|
nm_system_device_flush_addresses_with_iface (connection->vpn_iface);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user