mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 21:10:12 +01:00
netns: schedule a commit when a single-hop route is merged
When a single-hop route is merged with another single-hop route from a
different interface creating a new ECMP route, NetworkManager needs to
schedule a commit on the l3cfg that is managing the first single-hop
route. Otherwise, the single-hop will continue to be there until a new
commit is scheduled.
Fixes: d9d33e2acc ('netns: fix configuring onlink routes for ECMP routes')
This commit is contained in:
parent
7a748ae556
commit
02efd96396
1 changed files with 8 additions and 2 deletions
|
|
@ -905,8 +905,14 @@ nm_netns_ip_route_ecmp_commit(NMNetns *self,
|
|||
if (obj_del) {
|
||||
if (NMP_OBJECT_CAST_IP4_ROUTE(obj_del)->n_nexthops > 1)
|
||||
nm_platform_object_delete(priv->platform, obj_del);
|
||||
else if (track_obj->l3cfg != l3cfg)
|
||||
nm_l3cfg_commit_on_idle_schedule(track_obj->l3cfg, NM_L3_CFG_COMMIT_TYPE_AUTO);
|
||||
else if (NMP_OBJECT_CAST_IP4_ROUTE(obj_del)->ifindex != nm_l3cfg_get_ifindex(l3cfg)) {
|
||||
/* A single-hop route from a different interface was merged
|
||||
* into a ECMP route. Now, it is time to notify the l3cfg that
|
||||
* is managing that single-hop route to remove it. */
|
||||
nm_l3cfg_commit_on_idle_schedule(
|
||||
nm_netns_l3cfg_get(self, NMP_OBJECT_CAST_IP4_ROUTE(obj_del)->ifindex),
|
||||
NM_L3_CFG_COMMIT_TYPE_UPDATE);
|
||||
}
|
||||
}
|
||||
|
||||
if (route->n_nexthops <= 1) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue