summaryrefslogtreecommitdiffstats
path: root/lib/routemap.h
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-09-08 19:46:21 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2021-09-08 22:37:50 +0200
commitc21258471764b99e7d1a5242bb17918bd7380740 (patch)
tree2681aa50479cf7371cddecac078a1dd497baf206 /lib/routemap.h
parentMerge pull request #9533 from mobash-rasool/ospfv3-bug-fixes (diff)
downloadfrr-c21258471764b99e7d1a5242bb17918bd7380740.tar.xz
frr-c21258471764b99e7d1a5242bb17918bd7380740.zip
lib: add ability to supply separate match/set objects to routemaps
Sometimes it's needed to match by fields of one object but set fields of another object. The following commit is an example. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/routemap.h')
-rw-r--r--lib/routemap.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/routemap.h b/lib/routemap.h
index b356dbf52..2c8eb2453 100644
--- a/lib/routemap.h
+++ b/lib/routemap.h
@@ -443,9 +443,12 @@ extern struct route_map *route_map_lookup_by_name(const char *name);
struct route_map *route_map_lookup_warn_noexist(struct vty *vty, const char *name);
/* Apply route map to the object. */
-extern route_map_result_t route_map_apply(struct route_map *map,
- const struct prefix *prefix,
- void *object);
+extern route_map_result_t route_map_apply_ext(struct route_map *map,
+ const struct prefix *prefix,
+ void *match_object,
+ void *set_object);
+#define route_map_apply(map, prefix, object) \
+ route_map_apply_ext(map, prefix, object, object)
extern void route_map_add_hook(void (*func)(const char *));
extern void route_map_delete_hook(void (*func)(const char *));