summaryrefslogtreecommitdiff
path: root/lib/routemap.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-06-30 09:56:51 -0400
committerDonald Sharp <sharpd@nvidia.com>2023-07-03 08:16:43 -0400
commitbdcea06d6a9a610200f8be7b9f86d22bf9663be9 (patch)
tree057359edd7f39b70fb0313e1d04ffa473d755069 /lib/routemap.c
parentc738d8db03be79ce638b82fca4620d9fa629fe22 (diff)
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 <sharpd@nvidia.com>
Diffstat (limited to 'lib/routemap.c')
-rw-r--r--lib/routemap.c5
1 files changed, 5 insertions, 0 deletions
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;
}