Revision 60e04f04 proto/ospf/rt.c

View differences:

proto/ospf/rt.c
119 119
      old->efn = ipath;
120 120
    }
121 121
    if ((new->type == RTS_OSPF) && (anet = (struct area_net *)fib_route(&oa->net_fib, prefix, pxlen)))
122
    {
122 123
       anet->active = 1;
124
       if (new->metric1 < anet->metric) anet->metric = new->metric1;
125
    }
123 126
  }
124 127
  else
125 128
  {
......
585 588
    {
586 589
      anet = (struct area_net *) nftmp;
587 590
      anet->active = 0;
591
      anet->metric = LSINFINITY;
588 592
    }
589 593
    FIB_WALK_END;
590 594
    ospf_rt_spfa(oa);
......
1046 1050
	if ((oa == po->backbone) && oaa->trcap) fl = 1;
1047 1051

  
1048 1052
        if(fl) flush_sum_lsa(oaa, &anet->fn, ORT_NET);
1049
        else originate_sum_lsa(oaa, &anet->fn, ORT_NET, 1);
1053
        else originate_sum_lsa(oaa, &anet->fn, ORT_NET, anet->metric);
1050 1054
      }
1051 1055
    }
1052 1056
    FIB_WALK_END;

Also available in: Unified diff