summaryrefslogtreecommitdiffstats
path: root/proto/ospf/ospf.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/ospf.c
parentfec5bec0b5f0e114a635c99a731e922ce735ff81 (diff)
downloadbird-a7a3a0a383a9dadcd93d876e7d9b43f870f20941.tar
bird-a7a3a0a383a9dadcd93d876e7d9b43f870f20941.zip
Added tagging of external LSA.
Diffstat (limited to 'proto/ospf/ospf.c')
-rw-r--r--proto/ospf/ospf.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index b385a48..15e9ea4 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -237,14 +237,20 @@ ospf_get_route_info(rte *rte, byte *buf, ea_list *attrs)
{
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