diff options
author | Russ White <russ@riw.us> | 2020-07-15 16:51:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-15 16:51:41 +0200 |
commit | 9a4dee5c3534c298d439eb6e4b6e45e89f66d4da (patch) | |
tree | 587079128695ad9e43c9e1eca96eedeee40a33c3 /lib | |
parent | Merge pull request #6740 from FRRouting/revert-5015-rpki_vrf_encapsulation (diff) | |
parent | libfrr: Retain ret value if the best idx is found (diff) | |
download | frr-9a4dee5c3534c298d439eb6e4b6e45e89f66d4da.tar.xz frr-9a4dee5c3534c298d439eb6e4b6e45e89f66d4da.zip |
Merge pull request #6736 from NaveenThanikachalam/rmap_noop
libfrr: Retain return value if the best index is found
Diffstat (limited to 'lib')
-rw-r--r-- | lib/routemap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/routemap.c b/lib/routemap.c index 7749ea4cc..1415a9e2e 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -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; } } |