mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 06:20:10 +01:00
nm-netns: mark the ECMP route as needs_update when registering
If an L3Cfg try to register an ECMP route that we are tracking we must mark it as needs_update because it means it could be dropped from kernel. When merging them if the merged route didn't change we should commit the route anyway because we know it needed update.
This commit is contained in:
parent
737cb5d424
commit
8b27a2b09a
1 changed files with 8 additions and 3 deletions
|
|
@ -209,7 +209,10 @@ _ecmp_track_init_merged_obj(EcmpTrackEcmpid *track_ecmpid, const NMPObject **out
|
|||
out:
|
||||
nm_assert(obj_new);
|
||||
if (nmp_object_equal(track_ecmpid->merged_obj, obj_new))
|
||||
return FALSE;
|
||||
/* the objects are equal but the update was needed, for example if the
|
||||
* routes were removed from kernel but not from our tracking
|
||||
* dictionaries and therefore we tried to register them again. */
|
||||
return TRUE;
|
||||
|
||||
if (track_ecmpid->merged_obj)
|
||||
*out_obj_del = g_steal_pointer(&track_ecmpid->merged_obj);
|
||||
|
|
@ -614,8 +617,10 @@ nm_netns_ip_route_ecmp_register(NMNetns *self, NML3Cfg *l3cfg, const NMPObject *
|
|||
_LOGT(
|
||||
"ecmp-route: track %s",
|
||||
nmp_object_to_string(track_obj->obj, NMP_OBJECT_TO_STRING_PUBLIC, sbuf, sizeof(sbuf)));
|
||||
} else
|
||||
track_obj->dirty = FALSE;
|
||||
} else {
|
||||
track_obj->dirty = FALSE;
|
||||
track_obj->parent_track_ecmpid->needs_update = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue