Skip to content

Commit

Permalink
Merge pull request FRRouting#8110 from rgirada/rmap_nb
Browse files Browse the repository at this point in the history
lib: Routemap is not getting applied upon changing the routemap action
  • Loading branch information
idryzhov committed Apr 29, 2021
2 parents ca4681d + 4fc5daf commit 55ea3f2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/routemap_northbound.c
Expand Up @@ -271,6 +271,7 @@ lib_route_map_entry_description_destroy(struct nb_cb_destroy_args *args)
static int lib_route_map_entry_action_modify(struct nb_cb_modify_args *args)
{
struct route_map_index *rmi;
struct route_map *map;

switch (args->event) {
case NB_EV_VALIDATE:
Expand All @@ -281,7 +282,15 @@ static int lib_route_map_entry_action_modify(struct nb_cb_modify_args *args)
case NB_EV_APPLY:
rmi = nb_running_get_entry(args->dnode, NULL, true);
rmi->type = yang_dnode_get_enum(args->dnode, NULL);
/* TODO: notify? */
map = rmi->map;

/* Execute event hook. */
if (route_map_master.event_hook) {
(*route_map_master.event_hook)(map->name);
route_map_notify_dependencies(map->name,
RMAP_EVENT_CALL_ADDED);
}

break;
}

Expand Down

0 comments on commit 55ea3f2

Please sign in to comment.