{
met='1';
type='E';
+
}
- if(rte->u.ospf.metric2!=0) met='2';
+ if(rte->u.ospf.metric2!=LSINFINITY) met='2';
if(rte->attrs->source==RTS_OSPF_IA) type='A';
if(rte->attrs->source==RTS_OSPF) type='I';
buf += bsprintf(buf, " %c", type);
if(met!=' ') buf += bsprintf(buf, "%c", met);
buf += bsprintf(buf, " (%d/%d)", rte->pref,
- (rte->u.ospf.metric2==0) ? rte->u.ospf.metric1 : rte->u.ospf.metric2);
+ (rte->u.ospf.metric2==LSINFINITY) ? rte->u.ospf.metric1 :
+ rte->u.ospf.metric2);
+ if(rte->attrs->source==RTS_OSPF_EXT)
+ {
+ buf += bsprintf(buf, " [%d]", rte->u.ospf.tag);
+ }
}
static int
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",
absroa=NULL;
nnhi=NULL;
- met=0;met2=0;
+ met=0;met2=0;tag=0;
WALK_LIST(atmp,po->area_list)
{
else
{
met=absr->dist+lt->metric;
- met2=0;
+ met2=LSINFINITY;
}
+ tag=lt->tag;
}
else
{
else
{
met=nf->metric+lt->metric;
- met2=0;
+ met2=LSINFINITY;
}
-
+ tag=lt->tag;
if((nn=neigh_find(p,<->fwaddr,0))!=NULL)
{
{
nf->metric=met;
nf->metric2=met2;
+ nf->tag=tag;
if(nnhi!=NULL)
{
nf->nh=nnh;
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;