diff --git a/ChangeLog b/ChangeLog index dcc59e2550..28e3417e8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +2008-04-15 Dan Williams + + Patch from Benoit Boissinot + + * 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 Remove exposure of wireless-tools mode types in the API. diff --git a/src/NetworkManagerSystem.c b/src/NetworkManagerSystem.c index 6cd9f3c758..e6ce3f35a8 100644 --- a/src/NetworkManagerSystem.c +++ b/src/NetworkManagerSystem.c @@ -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); diff --git a/src/NetworkManagerSystem.h b/src/NetworkManagerSystem.h index e471840163..1c569eb52c 100644 --- a/src/NetworkManagerSystem.h +++ b/src/NetworkManagerSystem.h @@ -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); diff --git a/src/backends/NetworkManagerArch.c b/src/backends/NetworkManagerArch.c index 04541397fb..95d9368025 100644 --- a/src/backends/NetworkManagerArch.c +++ b/src/backends/NetworkManagerArch.c @@ -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 diff --git a/src/backends/NetworkManagerDebian.c b/src/backends/NetworkManagerDebian.c index 5f61ffabc0..70b0824d8b 100644 --- a/src/backends/NetworkManagerDebian.c +++ b/src/backends/NetworkManagerDebian.c @@ -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); } /* diff --git a/src/backends/NetworkManagerFrugalware.c b/src/backends/NetworkManagerFrugalware.c index 95847ceb3b..76dc755d28 100644 --- a/src/backends/NetworkManagerFrugalware.c +++ b/src/backends/NetworkManagerFrugalware.c @@ -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"); } diff --git a/src/backends/NetworkManagerGeneric.c b/src/backends/NetworkManagerGeneric.c index e115e0a687..141344006f 100644 --- a/src/backends/NetworkManagerGeneric.c +++ b/src/backends/NetworkManagerGeneric.c @@ -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"); } diff --git a/src/backends/NetworkManagerGeneric.h b/src/backends/NetworkManagerGeneric.h index ed7e75d39c..c44fb4273d 100644 --- a/src/backends/NetworkManagerGeneric.h +++ b/src/backends/NetworkManagerGeneric.h @@ -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); diff --git a/src/backends/NetworkManagerGentoo.c b/src/backends/NetworkManagerGentoo.c index b72cc16a6e..03af181758 100644 --- a/src/backends/NetworkManagerGentoo.c +++ b/src/backends/NetworkManagerGentoo.c @@ -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 diff --git a/src/backends/NetworkManagerMandriva.c b/src/backends/NetworkManagerMandriva.c index 62ae4715f7..266e9779f4 100644 --- a/src/backends/NetworkManagerMandriva.c +++ b/src/backends/NetworkManagerMandriva.c @@ -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); } diff --git a/src/backends/NetworkManagerPaldo.c b/src/backends/NetworkManagerPaldo.c index 1b8d2e9851..ae466b2c3c 100644 --- a/src/backends/NetworkManagerPaldo.c +++ b/src/backends/NetworkManagerPaldo.c @@ -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); } diff --git a/src/backends/NetworkManagerRedHat.c b/src/backends/NetworkManagerRedHat.c index a9cec5b4bb..b509a602e1 100644 --- a/src/backends/NetworkManagerRedHat.c +++ b/src/backends/NetworkManagerRedHat.c @@ -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); } diff --git a/src/backends/NetworkManagerSlackware.c b/src/backends/NetworkManagerSlackware.c index 15a31012ad..d6224c3aec 100644 --- a/src/backends/NetworkManagerSlackware.c +++ b/src/backends/NetworkManagerSlackware.c @@ -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); } /* diff --git a/src/backends/NetworkManagerSuSE.c b/src/backends/NetworkManagerSuSE.c index 30be3ba441..db6bfd6afb 100644 --- a/src/backends/NetworkManagerSuSE.c +++ b/src/backends/NetworkManagerSuSE.c @@ -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); } diff --git a/src/nm-device.c b/src/nm-device.c index 2f781b50c5..39b12c68e4 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -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 */ diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c index 19063948d4..c940da78ec 100644 --- a/src/vpn-manager/nm-vpn-connection.c +++ b/src/vpn-manager/nm-vpn-connection.c @@ -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) {