NetworkManager/0006-default-route-manager-pick-up-platform-changes-after.patch

34 lines
1.5 KiB
Diff

From 5e9dd4b267b7dacc96da6beca1df0ec9781c362b Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Wed, 22 Jul 2015 10:33:49 +0200
Subject: [PATCH 06/11] default-route-manager: pick up platform changes after
NMDevice
If a default route is configured externally, we want the device to pick the
change and register it with the default-route-manager first.
https://bugzilla.redhat.com/show_bug.cgi?id=1244483
(cherry picked from commit e67b52ed16afebce538f2f1844cf6e854e27c64d)
---
src/nm-default-route-manager.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/nm-default-route-manager.c b/src/nm-default-route-manager.c
index fbb07ce..b36dd44 100644
--- a/src/nm-default-route-manager.c
+++ b/src/nm-default-route-manager.c
@@ -1290,7 +1290,9 @@ _resync_idle_reschedule (NMDefaultRouteManager *self)
g_source_remove (priv->resync.idle_handle);
else
_LOGD (0, "resync: schedule on idle");
- priv->resync.idle_handle = g_idle_add ((GSourceFunc) _resync_idle_now, self);
+ /* Schedule this at low priority so that on an external change to platform
+ * a NMDevice has a chance to picks up the changes first. */
+ priv->resync.idle_handle = g_idle_add_full (G_PRIORITY_LOW, (GSourceFunc) _resync_idle_now, self, NULL);
} else if (!priv->resync.idle_handle) {
priv->resync.idle_handle = g_timeout_add (priv->resync.backoff_wait_time_ms, (GSourceFunc) _resync_idle_now, self);
_LOGD (0, "resync: schedule in %u.%03u seconds (%u)", priv->resync.backoff_wait_time_ms/1000,
--
2.4.3