mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-10 13:48:25 +02:00
ndisc: fix ordering of routes
When no existing route has lower priority than the new one, insert
at the end of the array instead of at the beginning. This is the
same fix that was applied to gateways.
Fixes: b324b970bc ('rdisc: fix double-addition of gateways & routes if priority increases')
This commit is contained in:
parent
5b53f8c218
commit
e95d775569
1 changed files with 1 additions and 1 deletions
|
|
@ -768,7 +768,7 @@ nm_ndisc_add_route(NMNDisc *ndisc, const NMNDiscRoute *new_item, gint64 now_msec
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
g_array_insert_val(rdata->routes, insert_idx == G_MAXUINT ? 0u : insert_idx, *new_item);
|
||||
g_array_insert_val(rdata->routes, insert_idx == G_MAXUINT ? rdata->routes->len : insert_idx, *new_item);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue