summaryrefslogtreecommitdiffstats
path: root/proto/ospf/rt.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-05-31 14:07:09 +0200
committerOndrej Filip <feela@network.cz>2000-05-31 14:07:09 +0200
commita7a3a0a383a9dadcd93d876e7d9b43f870f20941 (patch)
tree55d1939746b1df127035d27aafd77499ed891fdb /proto/ospf/rt.c
parentfec5bec0b5f0e114a635c99a731e922ce735ff81 (diff)
downloadbird-a7a3a0a383a9dadcd93d876e7d9b43f870f20941.tar
bird-a7a3a0a383a9dadcd93d876e7d9b43f870f20941.zip
Added tagging of external LSA.
Diffstat (limited to 'proto/ospf/rt.c')
-rw-r--r--proto/ospf/rt.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c
index d50e438..9b85df7 100644
--- a/proto/ospf/rt.c
+++ b/proto/ospf/rt.c
@@ -259,6 +259,7 @@ ospf_ext_spfa(struct proto_ospf *po) /* FIXME looking into inter-area */
ip_addr ip,nnh;
struct iface *nnhi=NULL;
u16 met,met2;
+ u32 tag;
neighbor *nn;
debug("%s: Starting routing table calculation for external routes\n",
@@ -311,7 +312,7 @@ ospf_ext_spfa(struct proto_ospf *po) /* FIXME looking into inter-area */
absroa=NULL;
nnhi=NULL;
- met=0;met2=0;
+ met=0;met2=0;tag=0;
WALK_LIST(atmp,po->area_list)
{
@@ -338,8 +339,9 @@ ospf_ext_spfa(struct proto_ospf *po) /* FIXME looking into inter-area */
else
{
met=absr->dist+lt->metric;
- met2=0;
+ met2=LSINFINITY;
}
+ tag=lt->tag;
}
else
{
@@ -360,9 +362,9 @@ ospf_ext_spfa(struct proto_ospf *po) /* FIXME looking into inter-area */
else
{
met=nf->metric+lt->metric;
- met2=0;
+ met2=LSINFINITY;
}
-
+ tag=lt->tag;
if((nn=neigh_find(p,&lt->fwaddr,0))!=NULL)
{
@@ -376,6 +378,7 @@ ospf_ext_spfa(struct proto_ospf *po) /* FIXME looking into inter-area */
{
nf->metric=met;
nf->metric2=met2;
+ nf->tag=tag;
if(nnhi!=NULL)
{
nf->nh=nnh;
@@ -447,7 +450,7 @@ noch:
e=rte_get_temp(&a0);
e->u.ospf.metric1=nf->metric;
e->u.ospf.metric2=nf->metric2;
- e->u.ospf.tag=0; /* FIXME Some config? */
+ e->u.ospf.tag=nf->tag;
e->pflags = 0;
e->net=ne;
e->pref = p->preference;