Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/route/route_obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,13 @@ static int route_update(struct nl_object *old_obj, struct nl_object *new_obj)
if (rtnl_route_get_nnexthops(new_route) != 1)
return -NLE_OPNOTSUPP;

/*
* If the route's nexthop id has changed, the new route replaces the
* old one
*/
if (rtnl_route_get_nhid(old_route) != rtnl_route_get_nhid(new_route))
return -NLE_OPNOTSUPP;

/*
* Get the only nexthop entry from the new route. For
* IPv6 we always get a route with a 0th NH
Expand Down