Diff for /embedaddon/quagga/ospfd/ospf_ase.c between versions 1.1 and 1.1.1.3

version 1.1, 2012/02/21 17:26:12 version 1.1.1.3, 2016/11/02 10:09:12
Line 135  ospf_ase_complete_direct_routes (struct ospf_route *ro Line 135  ospf_ase_complete_direct_routes (struct ospf_route *ro
 {  {
   struct listnode *node;    struct listnode *node;
   struct ospf_path *op;    struct ospf_path *op;
   struct interface *ifp;  
   
   for (ALL_LIST_ELEMENTS_RO (ro->paths, node, op))    for (ALL_LIST_ELEMENTS_RO (ro->paths, node, op))
     if (op->nexthop.s_addr == 0)      if (op->nexthop.s_addr == 0)
Line 637  ospf_ase_calculate_timer (struct thread *t) Line 636  ospf_ase_calculate_timer (struct thread *t)
   struct route_node *rn;    struct route_node *rn;
   struct listnode *node;    struct listnode *node;
   struct ospf_area *area;    struct ospf_area *area;
     struct timeval start_time, stop_time;
   
   ospf = THREAD_ARG (t);    ospf = THREAD_ARG (t);
   ospf->t_ase_calc = NULL;    ospf->t_ase_calc = NULL;
Line 645  ospf_ase_calculate_timer (struct thread *t) Line 645  ospf_ase_calculate_timer (struct thread *t)
     {      {
       ospf->ase_calc = 0;        ospf->ase_calc = 0;
   
         quagga_gettime(QUAGGA_CLK_MONOTONIC, &start_time);
   
       /* Calculate external route for each AS-external-LSA */        /* Calculate external route for each AS-external-LSA */
       LSDB_LOOP (EXTERNAL_LSDB (ospf), rn, lsa)        LSDB_LOOP (EXTERNAL_LSDB (ospf), rn, lsa)
         ospf_ase_calculate_route (ospf, lsa);          ospf_ase_calculate_route (ospf, lsa);
Line 674  ospf_ase_calculate_timer (struct thread *t) Line 676  ospf_ase_calculate_timer (struct thread *t)
       ospf_route_table_free (ospf->old_external_route);        ospf_route_table_free (ospf->old_external_route);
       ospf->old_external_route = ospf->new_external_route;        ospf->old_external_route = ospf->new_external_route;
       ospf->new_external_route = route_table_init ();        ospf->new_external_route = route_table_init ();
   
         quagga_gettime(QUAGGA_CLK_MONOTONIC, &stop_time);
   
         zlog_info ("SPF Processing Time(usecs): External Routes: %lld\n",
                    (stop_time.tv_sec - start_time.tv_sec)*1000000LL+
                    (stop_time.tv_usec - start_time.tv_usec));
     }      }
   return 0;    return 0;
 }  }
Line 715  ospf_ase_register_external_lsa (struct ospf_lsa *lsa,  Line 723  ospf_ase_register_external_lsa (struct ospf_lsa *lsa, 
   rn = route_node_get (top->external_lsas, (struct prefix *) &p);    rn = route_node_get (top->external_lsas, (struct prefix *) &p);
   if ((lst = rn->info) == NULL)    if ((lst = rn->info) == NULL)
     rn->info = lst = list_new();      rn->info = lst = list_new();
     else
       route_unlock_node (rn);
   
   /* We assume that if LSA is deleted from DB    /* We assume that if LSA is deleted from DB
      is is also deleted from this RT */       is is also deleted from this RT */
Line 735  ospf_ase_unregister_external_lsa (struct ospf_lsa *lsa Line 745  ospf_ase_unregister_external_lsa (struct ospf_lsa *lsa
   p.prefixlen = ip_masklen (al->mask);    p.prefixlen = ip_masklen (al->mask);
   apply_mask_ipv4 (&p);    apply_mask_ipv4 (&p);
   
  rn = route_node_get (top->external_lsas, (struct prefix *) &p);  rn = route_node_lookup (top->external_lsas, (struct prefix *) &p);
  lst = rn->info; 
   
  /* XXX lst can be NULL */  if (rn) {
  if (lst) {    lst = rn->info;
     listnode_delete (lst, lsa);      listnode_delete (lst, lsa);
     ospf_lsa_unlock (&lsa); /* external_lsas list */      ospf_lsa_unlock (&lsa); /* external_lsas list */
       route_unlock_node (rn);
   }    }
 }  }
   
Line 813  ospf_ase_incremental_update (struct ospf *ospf, struct Line 823  ospf_ase_incremental_update (struct ospf *ospf, struct
     {      {
       rn2 = route_node_get (tmp_old, (struct prefix *) &p);        rn2 = route_node_get (tmp_old, (struct prefix *) &p);
       rn2->info = rn->info;        rn2->info = rn->info;
         route_unlock_node (rn);
     }      }
   
   /* install changes to zebra */    /* install changes to zebra */
Line 836  ospf_ase_incremental_update (struct ospf *ospf, struct Line 847  ospf_ase_incremental_update (struct ospf *ospf, struct
       if (rn)        if (rn)
         {          {
           rn->info = NULL;            rn->info = NULL;
           route_unlock_node (rn);  
           route_unlock_node (rn);            route_unlock_node (rn);
         }          }
     }      }

Removed from v.1.1  
changed lines
  Added in v.1.1.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>