Skip to content

Commit

Permalink
lib: Add two places we were not counting route-map applied
Browse files Browse the repository at this point in the history
There were a couple of places where it was possible a route-map
was applied( and DENIED ) but the count for the number of times
the application happen was not incremented.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
  • Loading branch information
donaldsharp committed Jul 3, 2023
1 parent c738d8d commit bdcea06
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/routemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2554,6 +2554,9 @@ route_map_result_t route_map_apply_ext(struct route_map *map,
struct prefix conv;

if (recursion > RMAP_RECURSION_LIMIT) {
if (map)
map->applied++;

flog_warn(
EC_LIB_RMAP_RECURSION_LIMIT,
"route-map recursion limit (%d) reached, discarding route",
Expand All @@ -2563,6 +2566,8 @@ route_map_result_t route_map_apply_ext(struct route_map *map,
}

if (map == NULL || map->head == NULL) {
if (map)
map->applied++;
ret = RMAP_DENYMATCH;
goto route_map_apply_end;
}
Expand Down

0 comments on commit bdcea06

Please sign in to comment.