diff options
author | Thomas Haller <thaller@redhat.com> | 2014-10-19 00:35:24 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-11-05 23:54:19 +0100 |
commit | 8cfa97026b2587334eed67774f6f318f75680e70 (patch) | |
tree | 06eebd309d1392dcec2acee07d36831a2938d603 | |
parent | c0fc5870c20032f4a90ae882ad38cf82e4a89487 (diff) | |
download | NetworkManager-8cfa97026b2587334eed67774f6f318f75680e70.tar.gz |
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.
Later we indeed will add default routes to NMIP4Config/NMIP6Config.
But that is still correct because nm_platform_ip4_route_sync() ignores
default routes already. So this is no functional change.
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r-- | src/nm-ip4-config.c | 7 | ||||
-rw-r--r-- | src/nm-ip6-config.c | 7 |
2 files changed, 0 insertions, 14 deletions
diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c index 371af35909..67fc2d7718 100644 --- a/src/nm-ip4-config.c +++ b/src/nm-ip4-config.c @@ -273,13 +273,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); } diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c index a0301b176b..21db3cc056 100644 --- a/src/nm-ip6-config.c +++ b/src/nm-ip6-config.c @@ -385,13 +385,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); } |