mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Calculation of external routes finally works.
This commit is contained in:
parent
31834faaf3
commit
8fb0c2c298
@ -256,8 +256,10 @@ ospf_ext_spfa(struct proto_ospf *po) /* FIXME looking into inter-area */
|
|||||||
struct ospf_lsa_ext *le;
|
struct ospf_lsa_ext *le;
|
||||||
struct ospf_lsa_ext_tos *lt;
|
struct ospf_lsa_ext_tos *lt;
|
||||||
int mlen;
|
int mlen;
|
||||||
ip_addr ip;
|
ip_addr ip,nnh;
|
||||||
|
struct iface *nnhi=NULL;
|
||||||
u16 met,met2;
|
u16 met,met2;
|
||||||
|
neighbor *nn;
|
||||||
|
|
||||||
debug("%s: Starting routing table calculation for external routes\n",
|
debug("%s: Starting routing table calculation for external routes\n",
|
||||||
p->name);
|
p->name);
|
||||||
@ -306,6 +308,7 @@ ospf_ext_spfa(struct proto_ospf *po) /* FIXME looking into inter-area */
|
|||||||
|
|
||||||
absr=NULL;
|
absr=NULL;
|
||||||
absroa=NULL;
|
absroa=NULL;
|
||||||
|
nnhi=NULL;
|
||||||
|
|
||||||
met=0;met2=0;
|
met=0;met2=0;
|
||||||
|
|
||||||
@ -358,6 +361,13 @@ ospf_ext_spfa(struct proto_ospf *po) /* FIXME looking into inter-area */
|
|||||||
met=nf->metric+lt->metric;
|
met=nf->metric+lt->metric;
|
||||||
met2=0;
|
met2=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if((nn=neigh_find(p,<->fwaddr,0))!=NULL)
|
||||||
|
{
|
||||||
|
nnh=nn->addr;
|
||||||
|
nnhi=nn->iface;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nf=fib_get(ef,&ip, mlen);
|
nf=fib_get(ef,&ip, mlen);
|
||||||
@ -365,10 +375,16 @@ ospf_ext_spfa(struct proto_ospf *po) /* FIXME looking into inter-area */
|
|||||||
{
|
{
|
||||||
nf->metric=met;
|
nf->metric=met;
|
||||||
nf->metric2=met2;
|
nf->metric2=met2;
|
||||||
|
if(nnhi!=NULL)
|
||||||
|
{
|
||||||
|
nf->nh=nnh;
|
||||||
|
nf->nhi=nnhi;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if(absr->nhi==NULL)
|
if(absr->nhi==NULL)
|
||||||
{
|
{
|
||||||
struct ospf_neighbor *neigh;
|
struct ospf_neighbor *neigh;
|
||||||
neighbor *nn;
|
|
||||||
|
|
||||||
if((neigh=find_neigh_noifa(po,absr->lsa.rt))==NULL)
|
if((neigh=find_neigh_noifa(po,absr->lsa.rt))==NULL)
|
||||||
{
|
{
|
||||||
@ -386,6 +402,7 @@ ospf_ext_spfa(struct proto_ospf *po) /* FIXME looking into inter-area */
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DBG("\nNow syncing my rt table with nest's\n\n");
|
DBG("\nNow syncing my rt table with nest's\n\n");
|
||||||
FIB_ITERATE_INIT(&fit,ef);
|
FIB_ITERATE_INIT(&fit,ef);
|
||||||
|
Loading…
Reference in New Issue
Block a user