]> git.puffer.fish Git - matthieu/frr.git/commitdiff
Fix bgp_exit crash
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 8 Sep 2015 13:24:21 +0000 (06:24 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 8 Sep 2015 13:24:21 +0000 (06:24 -0700)
Ticket: CM-7358
Reviewed-by: CCR-3462
Testing: See bug

bgpd/bgp_route.c

index 3827fb436adc55767f9ffd830419842eb5174b6b..33d822dad6f190442f9bc3393b9a1677cd5c7df7 100644 (file)
@@ -2213,6 +2213,10 @@ bgp_process (struct bgp *bgp, struct bgp_node *rn, afi_t afi, safi_t safi)
   if (CHECK_FLAG (rn->flags, BGP_NODE_PROCESS_SCHEDULED))
     return;
 
+  if ( (bm->process_main_queue == NULL) ||
+       (bm->process_rsclient_queue == NULL) )
+    bgp_process_queue_init ();
+
   pqnode = XCALLOC (MTYPE_BGP_PROCESS_QUEUE, 
                     sizeof (struct bgp_process_queue));
   if (!pqnode)
@@ -2245,6 +2249,10 @@ bgp_add_eoiu_mark (struct bgp *bgp, bgp_table_t type)
 {
   struct bgp_process_queue *pqnode;
 
+  if ( (bm->process_main_queue == NULL) ||
+       (bm->process_rsclient_queue == NULL) )
+    bgp_process_queue_init ();
+
   pqnode = XCALLOC (MTYPE_BGP_PROCESS_QUEUE,
                     sizeof (struct bgp_process_queue));
   if (!pqnode)