summaryrefslogtreecommitdiff
path: root/lib/routemap_northbound.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-11-22 21:26:33 +0200
committerDonatas Abraitis <donatas.abraitis@gmail.com>2021-11-23 13:47:26 +0200
commitbc63ba980f51642582ffbade6bfdf66bae5cf89d (patch)
tree66593f4479f0a822b82b2c96495db839680f8869 /lib/routemap_northbound.c
parentf7517a8b44a950c0bf6a34b90fb6372b39174473 (diff)
bgpd: Add an ability to match ipv6 next-hop by access-list
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'lib/routemap_northbound.c')
-rw-r--r--lib/routemap_northbound.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/routemap_northbound.c b/lib/routemap_northbound.c
index 3473ca2aea..7f7bc9f9c4 100644
--- a/lib/routemap_northbound.c
+++ b/lib/routemap_northbound.c
@@ -601,6 +601,16 @@ static int lib_route_map_entry_match_condition_list_name_modify(
rhc->rhc_rmi, "ip next-hop", acl,
RMAP_EVENT_FILTER_ADDED,
args->errmsg, args->errmsg_len);
+ } else if (IS_MATCH_IPv6_NEXTHOP_LIST(condition)) {
+ if (rmap_match_set_hook.match_ipv6_next_hop == NULL)
+ return NB_OK;
+ rhc->rhc_mhook = rmap_match_set_hook.no_match_ipv6_next_hop;
+ rhc->rhc_rule = "ipv6 next-hop";
+ rhc->rhc_event = RMAP_EVENT_FILTER_DELETED;
+ rv = rmap_match_set_hook.match_ipv6_next_hop(
+ rhc->rhc_rmi, "ipv6 next-hop", acl,
+ RMAP_EVENT_FILTER_ADDED, args->errmsg,
+ args->errmsg_len);
} else if (IS_MATCH_IPv4_NEXTHOP_PREFIX_LIST(condition)) {
if (rmap_match_set_hook.match_ip_next_hop_prefix_list == NULL)
return NB_OK;