From 2cc1813340c63dbbdc183931a700bb38740419e1 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 13 Sep 2017 16:45:22 +0200 Subject: core: workaround configuring IPv6 routes with "src" (RTA_PREFSRC) Kernel does not allow to add IPv6 routes with "src", as long as the corresponding address is still tentative (related bug rh#1457196). The workaround for this is cumbersome. First, when we fail to add such a route with "pref_src", we guess that it happend due to this issue. In that case, nm_ip6_config_commit() returns the list of routes that could not be added for the moment (but hopefully can be added later). We track this list in NMDevice, and keep trying to merge the routes back into ip6_config. In order to not try indefinitely, keep track of a timestamp when we tried to add this route for the first time. Another uglyness is that pending tentative routes don't explicitly block activation. In practice they may do, because for these routes we also have an IPv6 address that is still doing DAD, so the IP configuration is still pending due to that. https://bugzilla.redhat.com/show_bug.cgi?id=1452684 --- src/nm-ip6-config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/nm-ip6-config.c') diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c index ce77394256..acb9ccb646 100644 --- a/src/nm-ip6-config.c +++ b/src/nm-ip6-config.c @@ -529,7 +529,8 @@ nm_ip6_config_capture (NMDedupMultiIndex *multi_idx, NMPlatform *platform, int i gboolean nm_ip6_config_commit (const NMIP6Config *self, - NMPlatform *platform) + NMPlatform *platform, + GPtrArray **out_temporary_not_available) { gs_unref_ptrarray GPtrArray *addresses = NULL; gs_unref_ptrarray GPtrArray *routes = NULL; @@ -552,7 +553,8 @@ nm_ip6_config_commit (const NMIP6Config *self, ifindex, routes, nm_platform_lookup_predicate_routes_main, - NULL)) + NULL, + out_temporary_not_available)) success = FALSE; return success; -- cgit v1.2.1