From bdcea06d6a9a610200f8be7b9f86d22bf9663be9 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 30 Jun 2023 09:56:51 -0400 Subject: [PATCH] lib: Add two places we were not counting route-map applied 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 --- lib/routemap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/routemap.c b/lib/routemap.c index 39455841e3..e0b0eb7a3c 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -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", @@ -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; }