summaryrefslogtreecommitdiff
path: root/lib/routemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/routemap.c')
-rw-r--r--lib/routemap.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/routemap.c b/lib/routemap.c
index 7fd5a96e5b..9529b79419 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -2540,7 +2540,8 @@ void route_map_notify_pentry_dependencies(const char *affected_name,
*/
route_map_result_t route_map_apply_ext(struct route_map *map,
const struct prefix *prefix,
- void *match_object, void *set_object)
+ void *match_object, void *set_object,
+ int *pref)
{
static int recursion = 0;
enum route_map_cmd_result_t match_ret = RMAP_NOMATCH;
@@ -2676,7 +2677,7 @@ route_map_result_t route_map_apply_ext(struct route_map *map,
ret = route_map_apply_ext(
nextrm, prefix,
match_object,
- set_object);
+ set_object, NULL);
recursion--;
}
@@ -2721,6 +2722,13 @@ route_map_apply_end:
(map ? map->name : "null"), prefix,
route_map_result_str(ret));
+ if (pref) {
+ if (index != NULL && ret == RMAP_PERMITMATCH)
+ *pref = index->pref;
+ else
+ *pref = 65536;
+ }
+
return (ret);
}