mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 17:40:04 +00:00
Merge pull request #6736 from NaveenThanikachalam/rmap_noop
libfrr: Retain return value if the best index is found
This commit is contained in:
commit
9a4dee5c35
@ -1692,14 +1692,19 @@ route_map_get_index(struct route_map *map, const struct prefix *prefix,
|
||||
* more noops, we retain this return value and
|
||||
* return this eventually if there are no
|
||||
* matches.
|
||||
* If a best match route-map index already
|
||||
* exists, do not reset the match_ret.
|
||||
*/
|
||||
if (*match_ret != RMAP_NOMATCH)
|
||||
if (!best_index && (*match_ret != RMAP_NOMATCH))
|
||||
*match_ret = ret;
|
||||
} else {
|
||||
/*
|
||||
* ret is RMAP_NOMATCH.
|
||||
* If a best match route-map index already
|
||||
* exists, do not reset the match_ret.
|
||||
*/
|
||||
*match_ret = ret;
|
||||
if (!best_index)
|
||||
*match_ret = ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user