core: remove unneeded check in nm_ip4_config_commit() for default routes

These lines are part of NM for a very long time.
I think they are wrong, because the default route is not
added to the NMIP4Config/NMIP6Config objects.

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2014-10-19 00:35:24 +02:00
parent f5c0646e1c
commit 276424c881
3 changed files with 4 additions and 20 deletions

View file

@ -278,13 +278,6 @@ nm_ip4_config_commit (const NMIP4Config *config, int ifindex)
&& nm_ip4_config_destination_is_direct (config, route->network, route->plen))
continue;
/* Don't add the default route if the connection
* is never supposed to be the default connection.
*/
if ( nm_ip4_config_get_never_default (config)
&& NM_PLATFORM_IP_ROUTE_IS_DEFAULT (route))
continue;
g_array_append_vals (routes, route, 1);
}

View file

@ -391,13 +391,6 @@ nm_ip6_config_commit (const NMIP6Config *config, int ifindex)
&& nm_ip6_config_destination_is_direct (config, &route->network, route->plen))
continue;
/* Don't add the default route if the connection
* is never supposed to be the default connection.
*/
if ( nm_ip6_config_get_never_default (config)
&& NM_PLATFORM_IP_ROUTE_IS_DEFAULT (route))
continue;
g_array_append_vals (routes, route, 1);
}

View file

@ -2010,9 +2010,8 @@ array_contains_ip6_route (const GArray *routes, const NMPlatformIP6Route *route)
* A convenience function to synchronize routes for a specific interface
* with the least possible disturbance. It simply removes routes that are
* not listed and adds routes that are.
*
* @known_routes should not contain a default route; if it does, it will be
* ignored.
* Default routes are ignored (both in @known_routes and those already
* configured on the device).
*
* Returns: %TRUE on success.
*/
@ -2083,9 +2082,8 @@ nm_platform_ip4_route_sync (int ifindex, const GArray *known_routes)
* A convenience function to synchronize routes for a specific interface
* with the least possible disturbance. It simply removes routes that are
* not listed and adds routes that are.
*
* @known_routes should not contain a default route; if it does, it will be
* ignored.
* Default routes are ignored (both in @known_routes and those already
* configured on the device).
*
* Returns: %TRUE on success.
*/