2008-04-15 Dan Williams <dcbw@redhat.com>
Patch from Benoit Boissinot <bboissin+networkmanager@gmail.com> * src/backends/NetworkManagerArch.c src/backends/NetworkManagerDebian.c src/backends/NetworkManagerFrugalware.c src/backends/NetworkManagerGeneric.c src/backends/NetworkManagerGeneric.h src/backends/NetworkManagerGentoo.c src/backends/NetworkManagerMandriva.c src/backends/NetworkManagerPaldo.c src/backends/NetworkManagerRedHat.c src/backends/NetworkManagerSlackware.c src/backends/NetworkManagerSuSE.c src/NetworkManagerSystem.h - flush_routes -> flush_ip4_routes - flush_addresses -> flush_ip4_addresses * src/NetworkManagerSystem.c src/nm-device.c src/vpn-manager/nm-vpn-connection.c - flush only IPv4 addresses; don't touch IPv6 routes and addresses git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3563 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
24
ChangeLog
24
ChangeLog
@@ -1,3 +1,27 @@
|
||||
2008-04-15 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
Patch from Benoit Boissinot <bboissin+networkmanager@gmail.com>
|
||||
|
||||
* src/backends/NetworkManagerArch.c
|
||||
src/backends/NetworkManagerDebian.c
|
||||
src/backends/NetworkManagerFrugalware.c
|
||||
src/backends/NetworkManagerGeneric.c
|
||||
src/backends/NetworkManagerGeneric.h
|
||||
src/backends/NetworkManagerGentoo.c
|
||||
src/backends/NetworkManagerMandriva.c
|
||||
src/backends/NetworkManagerPaldo.c
|
||||
src/backends/NetworkManagerRedHat.c
|
||||
src/backends/NetworkManagerSlackware.c
|
||||
src/backends/NetworkManagerSuSE.c
|
||||
src/NetworkManagerSystem.h
|
||||
- flush_routes -> flush_ip4_routes
|
||||
- flush_addresses -> flush_ip4_addresses
|
||||
|
||||
* src/NetworkManagerSystem.c
|
||||
src/nm-device.c
|
||||
src/vpn-manager/nm-vpn-connection.c
|
||||
- flush only IPv4 addresses; don't touch IPv6 routes and addresses
|
||||
|
||||
2008-04-15 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
Remove exposure of wireless-tools mode types in the API.
|
||||
|
@@ -417,7 +417,7 @@ nm_system_vpn_device_set_from_ip4_config (NMDevice *active_device,
|
||||
|
||||
sleep (1);
|
||||
|
||||
nm_system_device_flush_routes_with_iface (iface);
|
||||
nm_system_device_flush_ip4_routes_with_iface (iface);
|
||||
|
||||
if (g_slist_length (routes) == 0) {
|
||||
nm_system_device_replace_default_route (iface, 0, 0);
|
||||
|
@@ -35,8 +35,8 @@
|
||||
void nm_system_init (void);
|
||||
gboolean nm_system_device_has_active_routes (NMDevice *dev);
|
||||
|
||||
void nm_system_device_flush_routes (NMDevice *dev);
|
||||
void nm_system_device_flush_routes_with_iface (const char *iface);
|
||||
void nm_system_device_flush_ip4_routes (NMDevice *dev);
|
||||
void nm_system_device_flush_ip4_routes_with_iface (const char *iface);
|
||||
|
||||
void nm_system_device_replace_default_route (const char *iface,
|
||||
guint32 gw,
|
||||
@@ -44,8 +44,8 @@ void nm_system_device_replace_default_route (const char *iface,
|
||||
|
||||
void nm_system_device_add_route_via_device_with_iface (const char *iface, const char *route);
|
||||
|
||||
void nm_system_device_flush_addresses (NMDevice *dev);
|
||||
void nm_system_device_flush_addresses_with_iface (const char *iface);
|
||||
void nm_system_device_flush_ip4_addresses (NMDevice *dev);
|
||||
void nm_system_device_flush_ip4_addresses_with_iface (const char *iface);
|
||||
|
||||
void nm_system_enable_loopback (void);
|
||||
void nm_system_flush_loopback_routes (void);
|
||||
|
@@ -94,48 +94,48 @@ void nm_system_device_add_route_via_device_with_iface (const char *iface, const
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses
|
||||
* nm_system_device_flush_ip4_addresses
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_routes (NMDevice *dev)
|
||||
{
|
||||
nm_generic_device_flush_routes (dev);
|
||||
nm_generic_device_flush_ip4_routes (dev);
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_routes_with_iface
|
||||
* nm_system_device_flush_ip4_routes_with_iface
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_routes_with_iface (const char *iface)
|
||||
{
|
||||
nm_generic_device_flush_routes_with_iface (iface);
|
||||
nm_generic_device_flush_ip4_routes_with_iface (iface);
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses
|
||||
* nm_system_device_flush_ip4_addresses
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_addresses (NMDevice *dev)
|
||||
{
|
||||
nm_generic_device_flush_addresses (dev);
|
||||
nm_generic_device_flush_ip4_addresses (dev);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses_with_iface
|
||||
* nm_system_device_flush_ip4_addresses_with_iface
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_addresses_with_iface (const char *iface)
|
||||
{
|
||||
nm_generic_device_flush_addresses_with_iface (iface);
|
||||
nm_generic_device_flush_ip4_addresses_with_iface (iface);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -243,8 +243,8 @@ gboolean nm_system_device_setup_static_ip4_config (NMDevice *dev)
|
||||
|
||||
error:
|
||||
g_free (buf);
|
||||
nm_system_device_flush_addresses (dev);
|
||||
nm_system_device_flush_routes (dev);
|
||||
nm_system_device_flush_ip4_addresses (dev);
|
||||
nm_system_device_flush_ip4_routes (dev);
|
||||
return(FALSE);
|
||||
}
|
||||
#endif
|
||||
|
@@ -83,48 +83,48 @@ void nm_system_device_add_route_via_device_with_iface (const char *iface, const
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses
|
||||
* nm_system_device_flush_ip4_addresses
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_routes (NMDevice *dev)
|
||||
{
|
||||
nm_generic_device_flush_routes (dev);
|
||||
nm_generic_device_flush_ip4_routes (dev);
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_routes_with_iface
|
||||
* nm_system_device_flush_ip4_routes_with_iface
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_routes_with_iface (const char *iface)
|
||||
{
|
||||
nm_generic_device_flush_routes_with_iface (iface);
|
||||
nm_generic_device_flush_ip4_routes_with_iface (iface);
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses
|
||||
* nm_system_device_flush_ip4_addresses
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_addresses (NMDevice *dev)
|
||||
{
|
||||
nm_generic_device_flush_addresses (dev);
|
||||
nm_generic_device_flush_ip4_addresses (dev);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses_with_iface
|
||||
* nm_system_device_flush_ip4_addresses_with_iface
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_addresses_with_iface (const char *iface)
|
||||
{
|
||||
nm_generic_device_flush_addresses_with_iface (iface);
|
||||
nm_generic_device_flush_ip4_addresses_with_iface (iface);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -51,64 +51,64 @@ void nm_system_init (void)
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_routes
|
||||
* nm_system_device_flush_ip4_routes
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_routes (NMDevice *dev)
|
||||
{
|
||||
g_return_if_fail (dev != NULL);
|
||||
|
||||
nm_system_device_flush_routes_with_iface (nm_device_get_iface (dev));
|
||||
nm_system_device_flush_ip4_routes_with_iface (nm_device_get_iface (dev));
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_routes_with_iface
|
||||
* nm_system_device_flush_ip4_routes_with_iface
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_routes_with_iface (const char *iface)
|
||||
{
|
||||
char *buf;
|
||||
|
||||
g_return_if_fail (iface != NULL);
|
||||
|
||||
/* Remove routing table entries */
|
||||
buf = g_strdup_printf ("/usr/sbin/ip route flush dev %s", iface);
|
||||
buf = g_strdup_printf ("/usr/sbin/ip -4 route flush dev %s", iface);
|
||||
nm_spawn_process (buf);
|
||||
g_free (buf);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses
|
||||
* nm_system_device_flush_ip4_addresses
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_addresses (NMDevice *dev)
|
||||
{
|
||||
g_return_if_fail (dev != NULL);
|
||||
|
||||
nm_system_device_flush_addresses_with_iface (nm_device_get_iface (dev));
|
||||
nm_system_device_flush_ip4_addresses_with_iface (nm_device_get_iface (dev));
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses_with_iface
|
||||
* nm_system_device_flush_ip4_addresses_with_iface
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_addresses_with_iface (const char *iface)
|
||||
{
|
||||
char *buf;
|
||||
|
||||
g_return_if_fail (iface != NULL);
|
||||
|
||||
/* Remove all IP addresses for a device */
|
||||
buf = g_strdup_printf ("/usr/sbin/ip addr flush dev %s", iface);
|
||||
buf = g_strdup_printf ("/usr/sbin/ip -4 addr flush dev %s", iface);
|
||||
nm_spawn_process (buf);
|
||||
g_free (buf);
|
||||
}
|
||||
@@ -253,7 +253,7 @@ nm_system_device_replace_default_route (const char *iface,
|
||||
*/
|
||||
void nm_system_flush_loopback_routes (void)
|
||||
{
|
||||
nm_system_device_flush_routes_with_iface ("lo");
|
||||
nm_system_device_flush_ip4_routes_with_iface ("lo");
|
||||
}
|
||||
|
||||
|
||||
|
@@ -104,64 +104,64 @@ void nm_generic_device_add_route_via_device_with_iface (const char *iface, const
|
||||
|
||||
|
||||
/*
|
||||
* nm_generic_device_flush_addresses
|
||||
* nm_generic_device_flush_ip4_addresses
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_generic_device_flush_routes (NMDevice *dev)
|
||||
void nm_generic_device_flush_ip4_routes (NMDevice *dev)
|
||||
{
|
||||
g_return_if_fail (dev != NULL);
|
||||
|
||||
nm_system_device_flush_routes_with_iface (nm_device_get_iface (dev));
|
||||
nm_system_device_flush_ip4_routes_with_iface (nm_device_get_iface (dev));
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_generic_device_flush_routes_with_iface
|
||||
* nm_generic_device_flush_ip4_routes_with_iface
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_generic_device_flush_routes_with_iface (const char *iface)
|
||||
void nm_generic_device_flush_ip4_routes_with_iface (const char *iface)
|
||||
{
|
||||
char *buf;
|
||||
|
||||
g_return_if_fail (iface != NULL);
|
||||
|
||||
/* Remove routing table entries */
|
||||
buf = g_strdup_printf (IP_BINARY_PATH" route flush dev %s", iface);
|
||||
buf = g_strdup_printf (IP_BINARY_PATH" -4 route flush dev %s", iface);
|
||||
nm_spawn_process (buf);
|
||||
g_free (buf);
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_generic_device_flush_addresses
|
||||
* nm_generic_device_flush_ip4_addresses
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_generic_device_flush_addresses (NMDevice *dev)
|
||||
void nm_generic_device_flush_ip4_addresses (NMDevice *dev)
|
||||
{
|
||||
g_return_if_fail (dev != NULL);
|
||||
|
||||
nm_system_device_flush_addresses_with_iface (nm_device_get_iface (dev));
|
||||
nm_system_device_flush_ip4_addresses_with_iface (nm_device_get_iface (dev));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* nm_generic_device_flush_addresses_with_iface
|
||||
* nm_generic_device_flush_ip4_addresses_with_iface
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_generic_device_flush_addresses_with_iface (const char *iface)
|
||||
void nm_generic_device_flush_ip4_addresses_with_iface (const char *iface)
|
||||
{
|
||||
char *buf;
|
||||
|
||||
g_return_if_fail (iface != NULL);
|
||||
|
||||
/* Remove all IP addresses for a device */
|
||||
buf = g_strdup_printf (IP_BINARY_PATH" addr flush dev %s", iface);
|
||||
buf = g_strdup_printf (IP_BINARY_PATH" -4 addr flush dev %s", iface);
|
||||
nm_spawn_process (buf);
|
||||
g_free (buf);
|
||||
}
|
||||
@@ -188,7 +188,7 @@ void nm_generic_enable_loopback (void)
|
||||
*/
|
||||
void nm_generic_flush_loopback_routes (void)
|
||||
{
|
||||
nm_system_device_flush_routes_with_iface ("lo");
|
||||
nm_system_device_flush_ip4_routes_with_iface ("lo");
|
||||
}
|
||||
|
||||
|
||||
|
@@ -36,15 +36,15 @@
|
||||
void nm_generic_init (void);
|
||||
gboolean nm_generic_device_has_active_routes (NMDevice *dev);
|
||||
|
||||
void nm_generic_device_flush_routes (NMDevice *dev);
|
||||
void nm_generic_device_flush_routes_with_iface (const char *iface);
|
||||
void nm_generic_device_flush_ip4_routes (NMDevice *dev);
|
||||
void nm_generic_device_flush_ip4_routes_with_iface (const char *iface);
|
||||
|
||||
void nm_generic_device_replace_default_route (const char *iface, guint32 gw, guint32 mss);
|
||||
|
||||
void nm_generic_device_add_route_via_device_with_iface (const char *iface, const char *route);
|
||||
|
||||
void nm_generic_device_flush_addresses (NMDevice *dev);
|
||||
void nm_generic_device_flush_addresses_with_iface (const char *iface);
|
||||
void nm_generic_device_flush_ip4_addresses (NMDevice *dev);
|
||||
void nm_generic_device_flush_ip4_addresses_with_iface (const char *iface);
|
||||
|
||||
void nm_generic_enable_loopback (void);
|
||||
void nm_generic_flush_loopback_routes (void);
|
||||
|
@@ -55,25 +55,25 @@ void nm_system_init (void)
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_routes
|
||||
* nm_system_device_flush_ip4_routes
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_routes (NMDevice *dev)
|
||||
{
|
||||
nm_generic_device_flush_routes (dev);
|
||||
nm_generic_device_flush_ip4_routes (dev);
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_routes_with_iface
|
||||
* nm_system_device_flush_ip4_routes_with_iface
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_routes_with_iface (const char *iface)
|
||||
{
|
||||
nm_generic_device_flush_routes_with_iface (iface);
|
||||
nm_generic_device_flush_ip4_routes_with_iface (iface);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -91,25 +91,25 @@ gboolean nm_system_device_has_active_routes (NMDevice *dev)
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses
|
||||
* nm_system_device_flush_ip4_addresses
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_addresses (NMDevice *dev)
|
||||
{
|
||||
nm_generic_device_flush_addresses (dev);
|
||||
nm_generic_device_flush_ip4_addresses (dev);
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses_with_iface
|
||||
* nm_system_device_flush_ip4_addresses_with_iface
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_addresses_with_iface (const char *iface)
|
||||
{
|
||||
nm_generic_device_flush_addresses_with_iface (iface);
|
||||
nm_generic_device_flush_ip4_addresses_with_iface (iface);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@@ -54,26 +54,26 @@ void nm_system_init (void)
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_routes
|
||||
* nm_system_device_flush_ip4_routes
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_routes (NMDevice *dev)
|
||||
{
|
||||
nm_generic_device_flush_routes (dev);
|
||||
nm_generic_device_flush_ip4_routes (dev);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_routes_with_iface
|
||||
* nm_system_device_flush_ip4_routes_with_iface
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_routes_with_iface (const char *iface)
|
||||
{
|
||||
nm_generic_device_flush_routes_with_iface (iface);
|
||||
nm_generic_device_flush_ip4_routes_with_iface (iface);
|
||||
}
|
||||
|
||||
|
||||
@@ -118,26 +118,26 @@ gboolean nm_system_device_has_active_routes (NMDevice *dev)
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses
|
||||
* nm_system_device_flush_ip4_addresses
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_addresses (NMDevice *dev)
|
||||
{
|
||||
nm_generic_device_flush_addresses (dev);
|
||||
nm_generic_device_flush_ip4_addresses (dev);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses_with_iface
|
||||
* nm_system_device_flush_ip4_addresses_with_iface
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_addresses_with_iface (const char *iface)
|
||||
{
|
||||
nm_generic_device_flush_addresses_with_iface (iface);
|
||||
nm_generic_device_flush_ip4_addresses_with_iface (iface);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -55,26 +55,26 @@ void nm_system_init (void)
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_routes
|
||||
* nm_system_device_flush_ip4_routes
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_routes (NMDevice *dev)
|
||||
{
|
||||
nm_generic_device_flush_routes (dev);
|
||||
nm_generic_device_flush_ip4_routes (dev);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_routes_with_iface
|
||||
* nm_system_device_flush_ip4_routes_with_iface
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_routes_with_iface (const char *iface)
|
||||
{
|
||||
nm_generic_device_flush_routes_with_iface (iface);
|
||||
nm_generic_device_flush_ip4_routes_with_iface (iface);
|
||||
}
|
||||
|
||||
|
||||
@@ -119,26 +119,26 @@ gboolean nm_system_device_has_active_routes (NMDevice *dev)
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses
|
||||
* nm_system_device_flush_ip4_addresses
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_addresses (NMDevice *dev)
|
||||
{
|
||||
nm_generic_device_flush_addresses (dev);
|
||||
nm_generic_device_flush_ip4_addresses (dev);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses_with_iface
|
||||
* nm_system_device_flush_ip4_addresses_with_iface
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_addresses_with_iface (const char *iface)
|
||||
{
|
||||
nm_generic_device_flush_addresses_with_iface (iface);
|
||||
nm_generic_device_flush_ip4_addresses_with_iface (iface);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -52,26 +52,26 @@ void nm_system_init (void)
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_routes
|
||||
* nm_system_device_flush_ip4_routes
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_routes (NMDevice *dev)
|
||||
{
|
||||
nm_generic_device_flush_routes (dev);
|
||||
nm_generic_device_flush_ip4_routes (dev);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_routes_with_iface
|
||||
* nm_system_device_flush_ip4_routes_with_iface
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_routes_with_iface (const char *iface)
|
||||
{
|
||||
nm_generic_device_flush_routes_with_iface (iface);
|
||||
nm_generic_device_flush_ip4_routes_with_iface (iface);
|
||||
}
|
||||
|
||||
|
||||
@@ -116,26 +116,26 @@ gboolean nm_system_device_has_active_routes (NMDevice *dev)
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses
|
||||
* nm_system_device_flush_ip4_addresses
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_addresses (NMDevice *dev)
|
||||
{
|
||||
nm_generic_device_flush_addresses (dev);
|
||||
nm_generic_device_flush_ip4_addresses (dev);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses_with_iface
|
||||
* nm_system_device_flush_ip4_addresses_with_iface
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_addresses_with_iface (const char *iface)
|
||||
{
|
||||
nm_generic_device_flush_addresses_with_iface (iface);
|
||||
nm_generic_device_flush_ip4_addresses_with_iface (iface);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -54,48 +54,48 @@ void nm_system_init (void)
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_routes
|
||||
* nm_system_device_flush_ip4_routes
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_routes (NMDevice *dev)
|
||||
{
|
||||
nm_generic_device_flush_routes (dev);
|
||||
nm_generic_device_flush_ip4_routes (dev);
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_routes_with_iface
|
||||
* nm_system_device_flush_ip4_routes_with_iface
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_routes_with_iface (const char *iface)
|
||||
{
|
||||
nm_generic_device_flush_routes_with_iface (iface);
|
||||
nm_generic_device_flush_ip4_routes_with_iface (iface);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses
|
||||
* nm_system_device_flush_ip4_addresses
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_addresses (NMDevice *dev)
|
||||
{
|
||||
nm_generic_device_flush_addresses (dev);
|
||||
nm_generic_device_flush_ip4_addresses (dev);
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses_with_iface
|
||||
* nm_system_device_flush_ip4_addresses_with_iface
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_addresses_with_iface (const char *iface)
|
||||
{
|
||||
nm_generic_device_flush_addresses_with_iface (iface);
|
||||
nm_generic_device_flush_ip4_addresses_with_iface (iface);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -61,26 +61,26 @@ void nm_system_init (void)
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_routes
|
||||
* nm_system_device_flush_ip4_routes
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_routes (NMDevice *dev)
|
||||
{
|
||||
nm_generic_device_flush_routes (dev);
|
||||
nm_generic_device_flush_ip4_routes (dev);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_routes_with_iface
|
||||
* nm_system_device_flush_ip4_routes_with_iface
|
||||
*
|
||||
* Flush all routes associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_routes_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_routes_with_iface (const char *iface)
|
||||
{
|
||||
nm_generic_device_flush_routes_with_iface (iface);
|
||||
nm_generic_device_flush_ip4_routes_with_iface (iface);
|
||||
}
|
||||
|
||||
|
||||
@@ -125,26 +125,26 @@ gboolean nm_system_device_has_active_routes (NMDevice *dev)
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses
|
||||
* nm_system_device_flush_ip4_addresses
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses (NMDevice *dev)
|
||||
void nm_system_device_flush_ip4_addresses (NMDevice *dev)
|
||||
{
|
||||
nm_generic_device_flush_addresses (dev);
|
||||
nm_generic_device_flush_ip4_addresses (dev);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* nm_system_device_flush_addresses_with_iface
|
||||
* nm_system_device_flush_ip4_addresses_with_iface
|
||||
*
|
||||
* Flush all network addresses associated with a network device
|
||||
*
|
||||
*/
|
||||
void nm_system_device_flush_addresses_with_iface (const char *iface)
|
||||
void nm_system_device_flush_ip4_addresses_with_iface (const char *iface)
|
||||
{
|
||||
nm_generic_device_flush_addresses_with_iface (iface);
|
||||
nm_generic_device_flush_ip4_addresses_with_iface (iface);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1051,8 +1051,8 @@ nm_device_deactivate (NMDeviceInterface *device)
|
||||
nm_device_set_ip4_config (self, NULL);
|
||||
|
||||
/* Take out any entries in the routing table and any IP address the device had. */
|
||||
nm_system_device_flush_routes (self);
|
||||
nm_system_device_flush_addresses (self);
|
||||
nm_system_device_flush_ip4_routes (self);
|
||||
nm_system_device_flush_ip4_addresses (self);
|
||||
nm_device_update_ip4_address (self);
|
||||
|
||||
/* Call device type-specific deactivation */
|
||||
|
@@ -745,8 +745,8 @@ connection_state_changed (NMVPNConnection *connection,
|
||||
|
||||
if (priv->tundev) {
|
||||
nm_system_device_set_up_down_with_iface (priv->tundev, FALSE);
|
||||
nm_system_device_flush_routes_with_iface (priv->tundev);
|
||||
nm_system_device_flush_addresses_with_iface (priv->tundev);
|
||||
nm_system_device_flush_ip4_routes_with_iface (priv->tundev);
|
||||
nm_system_device_flush_ip4_addresses_with_iface (priv->tundev);
|
||||
}
|
||||
|
||||
if (priv->ip4_config) {
|
||||
|
Reference in New Issue
Block a user