Revision 6f8bbaa1 proto/ospf/topology.c

View differences:

proto/ospf/topology.c
404 404
void
405 405
ospf_flush_lsa(struct ospf_proto *p, struct top_hash_entry *en)
406 406
{
407
  OSPF_TRACE(D_EVENTS, "Flushing LSA: Type: %04x, Id: %R, Rt: %R, Seq: %08x",
408
	     en->lsa_type, en->lsa.id, en->lsa.rt, en->lsa.sn);
409

  
410 407
  if (en->next_lsa_body)
411 408
  {
412 409
    mb_free(en->next_lsa_body);
......
418 415
  if (en->lsa.age == LSA_MAXAGE)
419 416
    return;
420 417

  
418
  OSPF_TRACE(D_EVENTS, "Flushing LSA: Type: %04x, Id: %R, Rt: %R, Seq: %08x",
419
	     en->lsa_type, en->lsa.id, en->lsa.rt, en->lsa.sn);
420

  
421 421
  en->lsa.age = LSA_MAXAGE;
422 422
  ospf_flood_lsa(p, en, NULL);
423 423

  
......
433 433
  /*
434 434
   * Called by ospf_update_lsadb() as part of LSA flushing process.
435 435
   * Flushed LSA was acknowledged by neighbors and we can free its content.
436
   * The log message is for 'remove' - we hide empty LSAs from users.
436 437
   */
437 438

  
439
  OSPF_TRACE(D_EVENTS, "Removing LSA: Type: %04x, Id: %R, Rt: %R, Seq: %08x",
440
	     en->lsa_type, en->lsa.id, en->lsa.rt, en->lsa.sn);
441

  
438 442
  if (en->lsa.sn == LSA_MAXSEQNO)
439 443
    en->lsa.sn = LSA_ZEROSEQNO;
440 444

  
......
1143 1147
  ospf_originate_lsa(p, &lsa);
1144 1148
}
1145 1149

  
1150
static struct top_hash_entry *
1151
ospf_hash_find_(struct top_graph *f, u32 domain, u32 lsa, u32 rtr, u32 type);
1152

  
1146 1153
static void
1147 1154
ospf_flush_ext_lsa(struct ospf_proto *p, struct ospf_area *oa, ort *nf)
1148 1155
{
......
1152 1159
  u32 dom = oa ? oa->areaid : 0;
1153 1160
  u32 id = ort_to_lsaid(p, nf);
1154 1161

  
1155
  en = ospf_hash_find(p->gr, dom, id, p->router_id, type);
1162
  en = ospf_hash_find_(p->gr, dom, id, p->router_id, type);
1156 1163

  
1157 1164
  if (!en || (en->nf != nf))
1158 1165
    return;
......
1795 1802
  ospf_top_ht_free(oldt);
1796 1803
}
1797 1804

  
1798
struct top_hash_entry *
1799
ospf_hash_find(struct top_graph *f, u32 domain, u32 lsa, u32 rtr, u32 type)
1805
static struct top_hash_entry *
1806
ospf_hash_find_(struct top_graph *f, u32 domain, u32 lsa, u32 rtr, u32 type)
1800 1807
{
1801 1808
  struct top_hash_entry *e;
1802 1809
  e = f->hash_table[ospf_top_hash(f, domain, lsa, rtr, type)];
......
1805 1812
	       e->lsa_type != type || e->domain != domain))
1806 1813
    e = e->next;
1807 1814

  
1815
  return e;
1816
}
1817

  
1818
struct top_hash_entry *
1819
ospf_hash_find(struct top_graph *f, u32 domain, u32 lsa, u32 rtr, u32 type)
1820
{
1821
  struct top_hash_entry *e = ospf_hash_find_(f, domain, lsa, rtr, type);
1822

  
1808 1823
  /* Hide hash entry with empty lsa_body */
1809 1824
  return (e && e->lsa_body) ? e : NULL;
1810 1825
}

Also available in: Unified diff