summaryrefslogtreecommitdiff
path: root/lib/routemap.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-11-24 19:38:07 +0300
committerGitHub <noreply@github.com>2021-11-24 19:38:07 +0300
commitaf36ea8434c227efea3e130fd72429b73c5f833c (patch)
treee90f5e2b3f2bd739ddd312eee07e55464a3266cb /lib/routemap.c
parent1b5a41b41e7a0e0edddb094a74211d978afa6b43 (diff)
parentc75d6ccbfe95d2708618ade7cc7198e46ee467dd (diff)
Merge pull request #10121 from ton31337/feature/match_ipv6_nexthop_prefixlist
bgpd: Add an ability to match ipv6 next-hop by prefix-list
Diffstat (limited to 'lib/routemap.c')
-rw-r--r--lib/routemap.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/routemap.c b/lib/routemap.c
index c4651f39a4..7f733c8114 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -282,6 +282,22 @@ void route_map_no_match_ipv6_next_hop_type_hook(int (*func)(
rmap_match_set_hook.no_match_ipv6_next_hop_type = func;
}
+/* match ipv6 next-hop prefix-list */
+void route_map_match_ipv6_next_hop_prefix_list_hook(int (*func)(
+ struct route_map_index *index, const char *command, const char *arg,
+ route_map_event_t type, char *errmsg, size_t errmsg_len))
+{
+ rmap_match_set_hook.match_ipv6_next_hop_prefix_list = func;
+}
+
+/* no match ipv6 next-hop prefix-list */
+void route_map_no_match_ipv6_next_hop_prefix_list_hook(int (*func)(
+ struct route_map_index *index, const char *command, const char *arg,
+ route_map_event_t type, char *errmsg, size_t errmsg_len))
+{
+ rmap_match_set_hook.no_match_ipv6_next_hop_prefix_list = func;
+}
+
/* match metric */
void route_map_match_metric_hook(int (*func)(
struct route_map_index *index, const char *command,