Revision 99f5fc14 proto/ospf/rt.c

View differences:

proto/ospf/rt.c
310 310
    }
311 311
}
312 312

  
313
/* 16.1 calculating shortest paths for an area */
313 314
static void
314 315
ospf_rt_spfa(struct ospf_area *oa)
315 316
{
......
510 511
  return 0;
511 512
}
512 513

  
514
/* 16.3 examining summary-LSAs in transit areas */
513 515
static void
514 516
ospf_rt_sum_tr(struct ospf_area *oa)
515 517
{
......
533 535
    if (en->domain != oa->areaid)
534 536
      continue;
535 537

  
538
    /* 16.3 (1a) */
536 539
    if (en->lsa.age == LSA_MAXAGE)
537 540
      continue;
538 541

  
539
    if (en->dist == LSINFINITY)
540
      continue;
542
    // if (en->dist == LSINFINITY)
543
    //   continue;
541 544

  
545
    /* 16.3 (2) */
542 546
    if (en->lsa.rt == po->router_id)
543 547
      continue;
544 548

  
......
583 587
      re = (ort *) fib_find(&bb->rtr, &ip, pxlen);
584 588
    }
585 589

  
590
    /* 16.3 (1b) */ 
591
    if (metric == LSINFINITY) 
592
      continue; 
593

  
594
    /* 16.3 (3) */
586 595
    if (!re) continue;
587 596
    if (re->n.oa->areaid != 0) continue;
588 597
    if ((re->n.type != RTS_OSPF) && (re->n.type != RTS_OSPF_IA)) continue;
589 598

  
599
    /* 16.3. (4) */
590 600
    abrip = ipa_from_rid(en->lsa.rt);
591

  
592 601
    abr = fib_find(&oa->rtr, &abrip, MAX_PREFIX_LENGTH);
593 602
    if (!abr) continue;
594 603

  
......
605 614
  }
606 615
}
607 616
  
608

  
617
/* 16.2 calculating inter-area routes */
609 618
static void
610 619
ospf_rt_sum(struct ospf_area *oa)
611 620
{

Also available in: Unified diff