From de61d58c96ba8fdd4ab1382a776e653e78c82ed2 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 23 May 2008 10:48:47 +0000 Subject: [PATCH] 2008-05-23 Dan Williams Patch from Benoit Boissinot * src/NetworkManagerSystem.h src/backends/NetworkManagerArch.c src/backends/NetworkManagerDebian.c src/backends/NetworkManagerFrugalware.c src/backends/NetworkManagerGentoo.c src/backends/NetworkManagerMandriva.c src/backends/NetworkManagerPaldo.c src/backends/NetworkManagerRedHat.c src/backends/NetworkManagerSlackware.c src/backends/NetworkManagerSuSE.c - (nm_system_device_has_active_routes, nm_system_flush_loopback_routes, nm_system_flush_arp_cache): remove, unused * src/backends/NetworkManagerGeneric.c src/backends/NetworkManagerGeneric.h - (nm_generic_device_has_active_routes, nm_generic_flush_loopback_routes, nm_generic_flush_arp_cache): remove, unused git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3689 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 22 +++++++++++ src/NetworkManagerSystem.h | 5 --- src/backends/NetworkManagerArch.c | 26 ------------- src/backends/NetworkManagerDebian.c | 26 ------------- src/backends/NetworkManagerFrugalware.c | 37 ------------------ src/backends/NetworkManagerGeneric.c | 26 ------------- src/backends/NetworkManagerGeneric.h | 5 --- src/backends/NetworkManagerGentoo.c | 52 ------------------------- src/backends/NetworkManagerMandriva.c | 51 ------------------------ src/backends/NetworkManagerPaldo.c | 38 ------------------ src/backends/NetworkManagerRedHat.c | 52 ------------------------- src/backends/NetworkManagerSlackware.c | 37 ------------------ src/backends/NetworkManagerSuSE.c | 39 ------------------- 13 files changed, 22 insertions(+), 394 deletions(-) diff --git a/ChangeLog b/ChangeLog index 097b53c3f7..8d3695612d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2008-05-23 Dan Williams + + Patch from Benoit Boissinot + + * src/NetworkManagerSystem.h + src/backends/NetworkManagerArch.c + src/backends/NetworkManagerDebian.c + src/backends/NetworkManagerFrugalware.c + src/backends/NetworkManagerGentoo.c + src/backends/NetworkManagerMandriva.c + src/backends/NetworkManagerPaldo.c + src/backends/NetworkManagerRedHat.c + src/backends/NetworkManagerSlackware.c + src/backends/NetworkManagerSuSE.c + - (nm_system_device_has_active_routes, nm_system_flush_loopback_routes, + nm_system_flush_arp_cache): remove, unused + + * src/backends/NetworkManagerGeneric.c + src/backends/NetworkManagerGeneric.h + - (nm_generic_device_has_active_routes, nm_generic_flush_loopback_routes, + nm_generic_flush_arp_cache): remove, unused + 2008-05-23 Dan Williams * system-settings/plugins/ifcfg-fedora/reader.c diff --git a/src/NetworkManagerSystem.h b/src/NetworkManagerSystem.h index 0efb9ae46e..aab2321123 100644 --- a/src/NetworkManagerSystem.h +++ b/src/NetworkManagerSystem.h @@ -33,7 +33,6 @@ */ void nm_system_init (void); -gboolean nm_system_device_has_active_routes (NMDevice *dev); void nm_system_device_flush_ip4_routes (NMDevice *dev); void nm_system_device_flush_ip4_routes_with_iface (const char *iface); @@ -48,8 +47,6 @@ 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); -void nm_system_flush_arp_cache (void); void nm_system_kill_all_dhcp_daemons (void); void nm_system_update_dns (void); @@ -72,8 +69,6 @@ gboolean nm_system_device_set_up_down_with_iface (const char *iface, gboolean gboolean nm_system_device_is_up (NMDevice *device); gboolean nm_system_device_is_up_with_iface (const char *iface); -gboolean nm_system_device_update_resolv_conf (void *data, int len, const char *domain_name); - void nm_system_set_hostname (NMIP4Config *config); void nm_system_activate_nis (NMIP4Config *config); void nm_system_shutdown_nis (void); diff --git a/src/backends/NetworkManagerArch.c b/src/backends/NetworkManagerArch.c index a0462f5dba..315855a110 100644 --- a/src/backends/NetworkManagerArch.c +++ b/src/backends/NetworkManagerArch.c @@ -211,32 +211,6 @@ void nm_system_enable_loopback (void) nm_system_device_set_up_down_with_iface ("lo", TRUE); } - -/* - * nm_system_flush_loopback_routes - * - * Flush all routes associated with the loopback device, because it - * sometimes gets the first route for ZeroConf/Link-Local traffic. - * - */ -void nm_system_flush_loopback_routes (void) -{ - nm_generic_flush_loopback_routes (); -} - - -/* - * nm_system_flush_arp_cache - * - * Flush all entries in the arp cache. - * - */ -void nm_system_flush_arp_cache (void) -{ - nm_generic_flush_arp_cache (); -} - - /* * nm_system_kill_all_dhcp_daemons * diff --git a/src/backends/NetworkManagerDebian.c b/src/backends/NetworkManagerDebian.c index 51528f892b..eb49a842e8 100644 --- a/src/backends/NetworkManagerDebian.c +++ b/src/backends/NetworkManagerDebian.c @@ -89,32 +89,6 @@ void nm_system_enable_loopback (void) nm_spawn_process ("/sbin/ifup lo"); } - -/* - * nm_system_flush_loopback_routes - * - * Flush all routes associated with the loopback device, because it - * sometimes gets the first route for ZeroConf/Link-Local traffic. - * - */ -void nm_system_flush_loopback_routes (void) -{ - nm_generic_flush_loopback_routes (); -} - - -/* - * nm_system_flush_arp_cache - * - * Flush all entries in the arp cache. - * - */ -void nm_system_flush_arp_cache (void) -{ - nm_generic_flush_arp_cache (); -} - - /* * nm_system_kill_all_dhcp_daemons * diff --git a/src/backends/NetworkManagerFrugalware.c b/src/backends/NetworkManagerFrugalware.c index 2e72b69549..d72bbd2c94 100644 --- a/src/backends/NetworkManagerFrugalware.c +++ b/src/backends/NetworkManagerFrugalware.c @@ -81,19 +81,6 @@ void nm_system_device_flush_ip4_routes_with_iface (const char *iface) g_free (buf); } -/* - * nm_system_device_has_active_routes - * - * Find out whether the specified device has any routes in the routing - * table. - * - */ -gboolean nm_system_device_has_active_routes (NMDevice *dev) -{ - return FALSE; -} - - /* * nm_system_enable_loopback * @@ -130,30 +117,6 @@ void nm_system_update_dns (void) /* I'm not running nscd */ } -/* - * nm_system_flush_loopback_routes - * - * Flush all routes associated with the loopback device, because it - * sometimes gets the first route for ZeroConf/Link-Local traffic. - * - */ -void nm_system_flush_loopback_routes (void) -{ - nm_system_device_flush_ip4_routes_with_iface ("lo"); -} - - -/* - * nm_system_flush_arp_cache - * - * Flush all entries in the arp cache. - * - */ -void nm_system_flush_arp_cache (void) -{ - nm_spawn_process ("/usr/sbin/ip neigh flush all"); -} - /* * nm_system_activate_nis * diff --git a/src/backends/NetworkManagerGeneric.c b/src/backends/NetworkManagerGeneric.c index c16d2eea3d..6a54e51d4a 100644 --- a/src/backends/NetworkManagerGeneric.c +++ b/src/backends/NetworkManagerGeneric.c @@ -94,32 +94,6 @@ void nm_generic_enable_loopback (void) nm_spawn_process (IP_BINARY_PATH" addr add 127.0.0.1/8 brd 127.255.255.255 dev lo scope host label lo"); } - -/* - * nm_generic_flush_loopback_routes - * - * Flush all routes associated with the loopback device, because it - * sometimes gets the first route for ZeroConf/Link-Local traffic. - * - */ -void nm_generic_flush_loopback_routes (void) -{ - nm_system_device_flush_ip4_routes_with_iface ("lo"); -} - - -/* - * nm_generic_flush_arp_cache - * - * Flush all entries in the arp cache. - * - */ -void nm_generic_flush_arp_cache (void) -{ - nm_spawn_process (IP_BINARY_PATH" neigh flush all"); -} - - /* * nm_generic_kill_all_dhcp_daemons * diff --git a/src/backends/NetworkManagerGeneric.h b/src/backends/NetworkManagerGeneric.h index b082b4cb0a..89722efa95 100644 --- a/src/backends/NetworkManagerGeneric.h +++ b/src/backends/NetworkManagerGeneric.h @@ -34,7 +34,6 @@ */ void nm_generic_init (void); -gboolean nm_generic_device_has_active_routes (NMDevice *dev); void nm_generic_device_flush_ip4_routes (NMDevice *dev); void nm_generic_device_flush_ip4_routes_with_iface (const char *iface); @@ -43,8 +42,6 @@ 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); -void nm_generic_flush_arp_cache (void); void nm_generic_kill_all_dhcp_daemons (void); void nm_generic_update_dns (void); @@ -62,8 +59,6 @@ gboolean nm_generic_vpn_device_unset_from_ip4_config (NMNamedManager *named, NM gboolean nm_generic_device_set_up_down (NMDevice *dev, gboolean up); gboolean nm_generic_device_set_up_down_with_iface (NMDevice *dev, const char *iface, gboolean up); -gboolean nm_generic_device_update_resolv_conf (void *data, int len, const char *domain_name); - void nm_generic_set_hostname (NMIP4Config *config); void nm_generic_activate_nis (NMIP4Config *config); void nm_generic_shutdown_nis (void); diff --git a/src/backends/NetworkManagerGentoo.c b/src/backends/NetworkManagerGentoo.c index a6ac548c6d..e2fa18fbb3 100644 --- a/src/backends/NetworkManagerGentoo.c +++ b/src/backends/NetworkManagerGentoo.c @@ -76,32 +76,6 @@ void nm_system_device_flush_ip4_routes_with_iface (const char *iface) nm_generic_device_flush_ip4_routes_with_iface (iface); } -/* - * nm_system_device_has_active_routes - * - * Find out whether the specified device has any routes in the routing - * table. - * - */ -gboolean nm_system_device_has_active_routes (NMDevice *dev) -{ - /* TODO */ - return (FALSE); -} - - -#if 0 - /* Alert other computers of our new address */ - temp_addr.s_addr = addr; - buf = g_strdup_printf ("/sbin/arping -q -A -c 1 -I %s %s", iface, inet_ntoa (temp_addr)); - nm_spawn_process (buf); - g_free (buf); - g_usleep (G_USEC_PER_SEC * 2); - buf = g_strdup_printf ("/sbin/arping -q -U -c 1 -I %s %s", iface, inet_ntoa (temp_addr)); - nm_spawn_process (buf); - g_free (buf); -#endif - /* * nm_system_enable_loopback * @@ -115,32 +89,6 @@ void nm_system_enable_loopback (void) nm_spawn_process("/etc/init.d/net.lo start"); } - -/* - * nm_system_flush_loopback_routes - * - * Flush all routes associated with the loopback device, because it - * sometimes gets the first route for ZeroConf/Link-Local traffic. - * - */ -void nm_system_flush_loopback_routes (void) -{ - nm_generic_flush_loopback_routes (); -} - -/* - * nm_system_flush_arp_cache - * - * Flush all entries in the arp cache. - * - */ -void nm_system_flush_arp_cache (void) -{ - nm_generic_flush_arp_cache (); -} - - - /* * nm_system_kill_all_dhcp_daemons * diff --git a/src/backends/NetworkManagerMandriva.c b/src/backends/NetworkManagerMandriva.c index 9db21c89c8..9e8f05d4ce 100644 --- a/src/backends/NetworkManagerMandriva.c +++ b/src/backends/NetworkManagerMandriva.c @@ -76,31 +76,6 @@ void nm_system_device_flush_ip4_routes_with_iface (const char *iface) nm_generic_device_flush_ip4_routes_with_iface (iface); } -/* - * nm_system_device_has_active_routes - * - * Find out whether the specified device has any routes in the routing - * table. - * - */ -gboolean nm_system_device_has_active_routes (NMDevice *dev) -{ - return (FALSE); -} - -#if 0 - /* Alert other computers of our new address */ - temp_addr.s_addr = addr; - buf = g_strdup_printf ("/sbin/arping -q -A -c 1 -I %s %s", iface, inet_ntoa (temp_addr)); - nm_spawn_process (buf); - g_free (buf); - g_usleep (G_USEC_PER_SEC * 2); - buf = g_strdup_printf ("/sbin/arping -q -U -c 1 -I %s %s", iface, inet_ntoa (temp_addr)); - nm_spawn_process (buf); - g_free (buf); -#endif - - /* * nm_system_enable_loopback * @@ -112,32 +87,6 @@ void nm_system_enable_loopback (void) nm_generic_enable_loopback (); } - -/* - * nm_system_flush_loopback_routes - * - * Flush all routes associated with the loopback device, because it - * sometimes gets the first route for ZeroConf/Link-Local traffic. - * - */ -void nm_system_flush_loopback_routes (void) -{ - nm_generic_flush_loopback_routes (); -} - - -/* - * nm_system_flush_arp_cache - * - * Flush all entries in the arp cache. - * - */ -void nm_system_flush_arp_cache (void) -{ - nm_generic_flush_arp_cache (); -} - - /* * nm_system_kill_all_dhcp_daemons * diff --git a/src/backends/NetworkManagerPaldo.c b/src/backends/NetworkManagerPaldo.c index c6f235222c..7e69e4e83f 100644 --- a/src/backends/NetworkManagerPaldo.c +++ b/src/backends/NetworkManagerPaldo.c @@ -77,18 +77,6 @@ void nm_system_device_flush_ip4_routes_with_iface (const char *iface) nm_generic_device_flush_ip4_routes_with_iface (iface); } -/* - * nm_system_device_has_active_routes - * - * Find out whether the specified device has any routes in the routing - * table. - * - */ -gboolean nm_system_device_has_active_routes (NMDevice *dev) -{ - return (FALSE); -} - /* * nm_system_enable_loopback * @@ -100,32 +88,6 @@ void nm_system_enable_loopback (void) nm_generic_enable_loopback (); } - -/* - * nm_system_flush_loopback_routes - * - * Flush all routes associated with the loopback device, because it - * sometimes gets the first route for ZeroConf/Link-Local traffic. - * - */ -void nm_system_flush_loopback_routes (void) -{ - nm_generic_flush_loopback_routes (); -} - - -/* - * nm_system_flush_arp_cache - * - * Flush all entries in the arp cache. - * - */ -void nm_system_flush_arp_cache (void) -{ - nm_generic_flush_arp_cache (); -} - - /* * nm_system_kill_all_dhcp_daemons * diff --git a/src/backends/NetworkManagerRedHat.c b/src/backends/NetworkManagerRedHat.c index f0f39217d3..93c467a2d6 100644 --- a/src/backends/NetworkManagerRedHat.c +++ b/src/backends/NetworkManagerRedHat.c @@ -74,32 +74,6 @@ void nm_system_device_flush_ip4_routes_with_iface (const char *iface) nm_generic_device_flush_ip4_routes_with_iface (iface); } -/* - * nm_system_device_has_active_routes - * - * Find out whether the specified device has any routes in the routing - * table. - * - */ -gboolean nm_system_device_has_active_routes (NMDevice *dev) -{ - return (FALSE); -} - - -#if 0 - /* Alert other computers of our new address */ - temp_addr.s_addr = addr; - buf = g_strdup_printf ("/sbin/arping -q -A -c 1 -I %s %s", iface, inet_ntoa (temp_addr)); - nm_spawn_process (buf); - g_free (buf); - g_usleep (G_USEC_PER_SEC * 2); - buf = g_strdup_printf ("/sbin/arping -q -U -c 1 -I %s %s", iface, inet_ntoa (temp_addr)); - nm_spawn_process (buf); - g_free (buf); -#endif - - /* * nm_system_enable_loopback * @@ -111,32 +85,6 @@ void nm_system_enable_loopback (void) nm_generic_enable_loopback (); } - -/* - * nm_system_flush_loopback_routes - * - * Flush all routes associated with the loopback device, because it - * sometimes gets the first route for ZeroConf/Link-Local traffic. - * - */ -void nm_system_flush_loopback_routes (void) -{ - nm_generic_flush_loopback_routes (); -} - - -/* - * nm_system_flush_arp_cache - * - * Flush all entries in the arp cache. - * - */ -void nm_system_flush_arp_cache (void) -{ - nm_generic_flush_arp_cache (); -} - - /* * nm_system_kill_all_dhcp_daemons * diff --git a/src/backends/NetworkManagerSlackware.c b/src/backends/NetworkManagerSlackware.c index 32ea6c0540..ee4d16ad75 100644 --- a/src/backends/NetworkManagerSlackware.c +++ b/src/backends/NetworkManagerSlackware.c @@ -75,19 +75,6 @@ void nm_system_device_flush_ip4_routes_with_iface (const char *iface) nm_generic_device_flush_ip4_routes_with_iface (iface); } -/* - * nm_system_device_has_active_routes - * - * Find out whether the specified device has any routes in the routing - * table. - * - */ -gboolean nm_system_device_has_active_routes (NMDevice *dev) -{ - return FALSE; -} - - /* * nm_system_enable_loopback * @@ -124,30 +111,6 @@ void nm_system_update_dns (void) /* I'm not running nscd */ } -/* - * nm_system_flush_loopback_routes - * - * Flush all routes associated with the loopback device, because it - * sometimes gets the first route for ZeroConf/Link-Local traffic. - * - */ -void nm_system_flush_loopback_routes (void) -{ - nm_generic_flush_loopback_routes (); -} - - -/* - * nm_system_flush_arp_cache - * - * Flush all entries in the arp cache. - * - */ -void nm_system_flush_arp_cache (void) -{ - nm_generic_flush_arp_cache (); -} - /* * nm_system_activate_nis * diff --git a/src/backends/NetworkManagerSuSE.c b/src/backends/NetworkManagerSuSE.c index 303fb0afec..2674c9245f 100644 --- a/src/backends/NetworkManagerSuSE.c +++ b/src/backends/NetworkManagerSuSE.c @@ -83,19 +83,6 @@ void nm_system_device_flush_ip4_routes_with_iface (const char *iface) nm_generic_device_flush_ip4_routes_with_iface (iface); } -/* - * nm_system_device_has_active_routes - * - * Find out whether the specified device has any routes in the routing - * table. - * - */ -gboolean nm_system_device_has_active_routes (NMDevice *dev) -{ - return FALSE; -} - - /* * nm_system_enable_loopback * @@ -107,32 +94,6 @@ void nm_system_enable_loopback (void) nm_generic_enable_loopback (); } - -/* - * nm_system_flush_loopback_routes - * - * Flush all routes associated with the loopback device, because it - * sometimes gets the first route for ZeroConf/Link-Local traffic. - * - */ -void nm_system_flush_loopback_routes (void) -{ - nm_generic_flush_loopback_routes (); -} - - -/* - * nm_system_flush_arp_cache - * - * Flush all entries in the arp cache. - * - */ -void nm_system_flush_arp_cache (void) -{ - nm_generic_flush_arp_cache (); -} - - /* * nm_system_kill_all_dhcp_daemons *