From a7a3a0a383a9dadcd93d876e7d9b43f870f20941 Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Wed, 31 May 2000 12:07:09 +0000 Subject: Added tagging of external LSA. --- proto/ospf/rt.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'proto/ospf/rt.c') 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,<->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; -- cgit v1.2.3