From c8d7a06d64960ba5e028aaff6b9b9b280a84dad2 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 15 Jan 2014 20:28:43 +0100 Subject: [PATCH] core/platform: revise failure to activate connection on error of setting route This revises the commit fbde824584266d9f6ac7f14916fdcc9cd179a73a which causes the activation of a connection to fail generally when a route cannot be added. Instead, we only want to fail for user configured routes. Related: https://bugzilla.gnome.org/show_bug.cgi?id=722843 Related: https://bugzilla.redhat.com/show_bug.cgi?id=999544 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1005416 Related: https://bugzilla.gnome.org/show_bug.cgi?id=721771 Signed-off-by: Thomas Haller --- src/platform/nm-platform.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index cbfc0baefb..179b6eae68 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -1635,6 +1635,11 @@ nm_platform_ip4_route_sync (int ifindex, const GArray *known_routes) known_route->gateway, known_route->metric, known_route->mss); + if (!success && known_route->source < NM_PLATFORM_SOURCE_USER) { + nm_log_dbg (LOGD_PLATFORM, "ignore error adding IPv4 route to kernel: %s", + nm_platform_ip4_route_to_string (known_route)); + success = TRUE; + } } } @@ -1689,6 +1694,11 @@ nm_platform_ip6_route_sync (int ifindex, const GArray *known_routes) known_route->gateway, known_route->metric, known_route->mss); + if (!success && known_route->source < NM_PLATFORM_SOURCE_USER) { + nm_log_dbg (LOGD_PLATFORM, "ignore error adding IPv6 route to kernel: %s", + nm_platform_ip6_route_to_string (known_route)); + success = TRUE; + } } }