Diff for /embedaddon/quagga/ospfd/ospf_lsdb.c between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 17:26:12 version 1.1.1.2, 2013/07/21 23:54:40
Line 72  ospf_lsdb_cleanup (struct ospf_lsdb *lsdb) Line 72  ospf_lsdb_cleanup (struct ospf_lsdb *lsdb)
     route_table_finish (lsdb->type[i].db);      route_table_finish (lsdb->type[i].db);
 }  }
   
static voidvoid
lsdb_prefix_set (struct prefix_ls *lp, struct ospf_lsa *lsa)ls_prefix_set (struct prefix_ls *lp, struct ospf_lsa *lsa)
 {  {
  lp->family = 0;  if (lp && lsa && lsa->data)
  lp->prefixlen = 64;    {
  lp->id = lsa->data->id;      lp->family = 0;
  lp->adv_router = lsa->data->adv_router;      lp->prefixlen = 64;
       lp->id = lsa->data->id;
       lp->adv_router = lsa->data->adv_router;
     }
 }  }
   
 static void  static void
Line 115  ospf_lsdb_add (struct ospf_lsdb *lsdb, struct ospf_lsa Line 118  ospf_lsdb_add (struct ospf_lsdb *lsdb, struct ospf_lsa
   struct route_node *rn;    struct route_node *rn;
   
   table = lsdb->type[lsa->data->type].db;    table = lsdb->type[lsa->data->type].db;
  lsdb_prefix_set (&lp, lsa);  ls_prefix_set (&lp, lsa);
   rn = route_node_get (table, (struct prefix *)&lp);    rn = route_node_get (table, (struct prefix *)&lp);
       
   /* nothing to do? */    /* nothing to do? */
Line 167  ospf_lsdb_delete (struct ospf_lsdb *lsdb, struct ospf_ Line 170  ospf_lsdb_delete (struct ospf_lsdb *lsdb, struct ospf_
       
   assert (lsa->data->type < OSPF_MAX_LSA);    assert (lsa->data->type < OSPF_MAX_LSA);
   table = lsdb->type[lsa->data->type].db;    table = lsdb->type[lsa->data->type].db;
  lsdb_prefix_set (&lp, lsa);  ls_prefix_set (&lp, lsa);
   if ((rn = route_node_lookup (table, (struct prefix *) &lp)))    if ((rn = route_node_lookup (table, (struct prefix *) &lp)))
     {      {
       if (rn->info == lsa)        if (rn->info == lsa)
Line 218  ospf_lsdb_lookup (struct ospf_lsdb *lsdb, struct ospf_ Line 221  ospf_lsdb_lookup (struct ospf_lsdb *lsdb, struct ospf_
   struct ospf_lsa *find;    struct ospf_lsa *find;
   
   table = lsdb->type[lsa->data->type].db;    table = lsdb->type[lsa->data->type].db;
  lsdb_prefix_set (&lp, lsa);  ls_prefix_set (&lp, lsa);
   rn = route_node_lookup (table, (struct prefix *) &lp);    rn = route_node_lookup (table, (struct prefix *) &lp);
   if (rn)    if (rn)
     {      {

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


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