summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2018-09-24 10:50:52 -0400
committerGitHub <noreply@github.com>2018-09-24 10:50:52 -0400
commitb3630e8436656d6be6d65c5cc67690a19159087a (patch)
treec9d124ba653e5266a328a2e0ee54ef765e8f32c2
parent99cee01c9bcf58a0fc8d714e9e3e0318da77edb3 (diff)
parentfdf823db5597f3c59b01c7e01b0140a7fd39a7c9 (diff)
Merge pull request #3064 from NaveenThanikachalam/3049
lib: Trigger callbacks to re-evaluate route-map clauses when "call" CLI is executed.
-rw-r--r--lib/routemap.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/routemap.c b/lib/routemap.c
index 66c15b9f2b..bec6d389e5 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -1759,8 +1759,19 @@ void route_map_upd8_dependency(route_map_event_t type, const char *arg,
{
struct hash *upd8_hash = NULL;
- if ((upd8_hash = route_map_get_dep_hash(type)))
+ if ((upd8_hash = route_map_get_dep_hash(type))) {
route_map_dep_update(upd8_hash, arg, rmap_name, type);
+
+ if (type == RMAP_EVENT_CALL_ADDED) {
+ /* Execute hook. */
+ if (route_map_master.add_hook)
+ (*route_map_master.add_hook)(rmap_name);
+ } else if (type == RMAP_EVENT_CALL_DELETED) {
+ /* Execute hook. */
+ if (route_map_master.delete_hook)
+ (*route_map_master.delete_hook)(rmap_name);
+ }
+ }
}
void route_map_notify_dependencies(const char *affected_name,