old->efn = ipath;
}
if ((new->type == RTS_OSPF) && (anet = (struct area_net *)fib_route(&oa->net_fib, prefix, pxlen)))
+ {
anet->active = 1;
+ if (new->metric1 < anet->metric) anet->metric = new->metric1;
+ }
}
else
{
{
anet = (struct area_net *) nftmp;
anet->active = 0;
+ anet->metric = LSINFINITY;
}
FIB_WALK_END;
ospf_rt_spfa(oa);
if ((oa == po->backbone) && oaa->trcap) fl = 1;
if(fl) flush_sum_lsa(oaa, &anet->fn, ORT_NET);
- else originate_sum_lsa(oaa, &anet->fn, ORT_NET, 1);
+ else originate_sum_lsa(oaa, &anet->fn, ORT_NET, anet->metric);
}
}
FIB_WALK_END;
#define ORTA_ASBR 1
#define ORTA_ABR 2
struct ospf_area *oa;
- int metric1;
- int metric2;
+ u32 metric1;
+ u32 metric2;
ip_addr nh; /* Next hop */
struct ospf_iface *ifa; /* Outgoing interface */
struct top_hash_entry *ar; /* Advertising router */