mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 16:04:49 +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
|
* more noops, we retain this return value and
|
||||||
* return this eventually if there are no
|
* return this eventually if there are no
|
||||||
* matches.
|
* 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;
|
*match_ret = ret;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* ret is RMAP_NOMATCH.
|
* 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