mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-04 21:08:04 +02:00
policy: minor fix when having multiple default routes with metric MAXUINT32
The case of having a metric MAXUINT32 is special, because in face of multiple default routes with the same metric, NMDefaultRouteManager cannot reduce the effective metric (because there is no lower priority value). This case works already correct, just when adding such a default route, ensure that we add it to the *first* entry. Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
a43ed6cb80
commit
825885d5b1
1 changed files with 2 additions and 1 deletions
|
|
@ -161,7 +161,8 @@ _platform_route_sync_add (const VTableIP *vtable, NMDefaultRouteManager *self, g
|
|||
|
||||
if (e->synced) {
|
||||
g_assert (!entry || metric == G_MAXUINT32);
|
||||
entry = e;
|
||||
if (!entry)
|
||||
entry = e;
|
||||
} else
|
||||
has_unsynced_entry = TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue