diff options
| author | saravanank <saravanank@vmware.com> | 2020-03-15 19:23:38 -0700 |
|---|---|---|
| committer | saravanank <saravanank@vmware.com> | 2020-03-16 23:57:45 -0700 |
| commit | a2665e381ce0929d8194f840bb8a255ee52f3f9b (patch) | |
| tree | bae119cdad162012c547ba9041fd7748a000c82e /zebra/main.c | |
| parent | 7f2ccbe562cae49fb8bf1770a0ec79b701ee41af (diff) | |
zebra: Disable rmap update thread before routemap_finish while shutting down zebra
Problem: While zebra going down, rmap update thread is being called as part of
timer event. This make zebra to crash.
RCA: At this time route_map_master_hash is made to 0 by sig int handler.
This is causing Zebrad to crash while executing rmap update thread
Fix: As part of SIGINT handler, before calling routemap_finish,
thread off any routemap update scheduled at that point and make sure that
it wont get scheduled again by making the timeout as 0.
Signed-off-by: Saravanan K <saravanank@vmware.com>
Diffstat (limited to 'zebra/main.c')
| -rw-r--r-- | zebra/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/zebra/main.c b/zebra/main.c index 5951c7e280..dab1449194 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -53,6 +53,7 @@ #include "zebra/zebra_rnh.h" #include "zebra/zebra_pbr.h" #include "zebra/zebra_vxlan.h" +#include "zebra/zebra_routemap.h" #if defined(HANDLE_NETLINK_FUZZING) #include "zebra/kernel_netlink.h" @@ -179,7 +180,13 @@ static void sigint(void) access_list_reset(); prefix_list_reset(); - route_map_finish(); + /* + * zebra_routemap_finish will + * 1 set rmap upd timer to 0 so that rmap update wont be scheduled again + * 2 Put off the rmap update thread + * 3 route_map_finish + */ + zebra_routemap_finish(); list_delete(&zrouter.client_list); |
