]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Add two places we were not counting route-map applied 13924/head
authorDonald Sharp <sharpd@nvidia.com>
Fri, 30 Jun 2023 13:56:51 +0000 (09:56 -0400)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 4 Jul 2023 08:34:49 +0000 (08:34 +0000)
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>
(cherry picked from commit bdcea06d6a9a610200f8be7b9f86d22bf9663be9)

lib/routemap.c

index 39455841e33b1a33537172af842f4021f09496da..e0b0eb7a3cc5add688043f9b7084585c887af879 100644 (file)
@@ -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;
        }