summaryrefslogtreecommitdiff
path: root/lib/plist.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-05-19 17:40:45 -0700
committerDonald Sharp <sharpd@cumulusnetworks.com>2015-05-19 17:40:45 -0700
commit518f0eb1886d7f84194e31bc54ab9224f6e0b24a (patch)
tree628cecf3c5020f342aa0fef83d73514301600fcb /lib/plist.c
parent244c1cdce553f6b722920ffe40a492ca230ad086 (diff)
bgpd: bgpd-event-driven-route-map-updates.patch
BGP: Reprocess the trigger points when an attached route map changes Currently, modifications to route maps do not affect already processed routes; they only affect new route updates. This patch addresses this limitation. Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
Diffstat (limited to 'lib/plist.c')
-rw-r--r--lib/plist.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/plist.c b/lib/plist.c
index 7416ebd2f9..f5950c331f 100644
--- a/lib/plist.c
+++ b/lib/plist.c
@@ -29,6 +29,7 @@
#include "buffer.h"
#include "stream.h"
#include "log.h"
+#include "routemap.h"
/* Each prefix-list's entry. */
struct prefix_list_entry
@@ -325,13 +326,16 @@ prefix_list_delete (struct prefix_list *plist)
cleared. */
master->recent = NULL;
+ route_map_notify_dependencies(plist->name, RMAP_EVENT_PLIST_DELETED);
+
+ if (master->delete_hook)
+ (*master->delete_hook) (NULL);
+
if (plist->name)
XFREE (MTYPE_PREFIX_LIST_STR, plist->name);
-
+
prefix_list_free (plist);
-
- if (master->delete_hook)
- (*master->delete_hook) (NULL);
+
}
static struct prefix_list_entry *
@@ -452,6 +456,7 @@ prefix_list_entry_delete (struct prefix_list *plist,
if (update_list)
{
+ route_map_notify_dependencies(plist->name, RMAP_EVENT_PLIST_DELETED);
if (plist->master->delete_hook)
(*plist->master->delete_hook) (plist);
@@ -514,6 +519,7 @@ prefix_list_entry_add (struct prefix_list *plist,
if (plist->master->add_hook)
(*plist->master->add_hook) (plist);
+ route_map_notify_dependencies(plist->name, RMAP_EVENT_PLIST_ADDED);
plist->master->recent = plist;
}