diff options
| author | vivek <vivek@cumulusnetworks.com> | 2016-03-22 17:46:30 +0000 |
|---|---|---|
| committer | vivek <vivek@cumulusnetworks.com> | 2016-03-22 17:46:30 +0000 |
| commit | 5fe9f9631d3be324202667f26e93cddead762e8c (patch) | |
| tree | bcacc70da17637ef93f2e400ca8b0fc0a788aaa2 /lib/routemap.c | |
| parent | c23af4d3e6ea864774f0bedfccc9ed1acb2cfab2 (diff) | |
Quagga: Make routemap updates or deletes work for VRFs
Updates to routemaps and delete of the routemap were not working properly
for VRFs. This was because while routemaps are global, the routemap update
processing timer and the processing were at the per-instance level. This
approach was unable to handle processing for multiple instances as the
routemap has no tracking of which instances are still pending processing.
This lead to the processing happening correctly only for the first instance
- which could be the default instance or some other instance. It could also
result in reference to freed memory for an instance.
The fix done is to make the update/delete processing also global and not per
instance. This means that the route-map delay timer will be global and a global
thread will handle the change (or delete) for all instances instead of spawning
a separate thread for each instance. To support this, a global BGP command
"bgp route-map delay-timer <value>" has been implemented. The existing command
per-instance is not deleted but will update the global timer.
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-6970, CM-9918
Reviewed By: CCR-4320
Testing Done: Manual, bgpsmoke
Diffstat (limited to 'lib/routemap.c')
| -rw-r--r-- | lib/routemap.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/routemap.c b/lib/routemap.c index 53df69dfcd..733e61c99b 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -323,8 +323,7 @@ route_map_get (const char *name) } void -route_map_walk_update_list (void *arg, - int (*route_map_update_fn) (void *arg, char *name)) +route_map_walk_update_list (int (*route_map_update_fn) (char *name)) { struct route_map *node; struct route_map *nnode = NULL; @@ -334,7 +333,7 @@ route_map_walk_update_list (void *arg, if (node->to_be_processed) { /* DD: Should we add any thread yield code here */ - route_map_update_fn(arg, node->name); + route_map_update_fn(node->name); nnode = node->next; route_map_clear_updated(node); } |
