summaryrefslogtreecommitdiff
path: root/proto/ospf/ospf.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-05-30 10:36:57 +0000
committerOndrej Filip <feela@network.cz>2000-05-30 10:36:57 +0000
commit73232f6b18222d73b38eae58e2c4c90062202709 (patch)
tree5192f6d9af30473dcdb5fcd5449faf078549ca76 /proto/ospf/ospf.c
parent2bdb5e0083b6f24d29d74bb5e62cd13d724ba54f (diff)
Better rt dumping.
Diffstat (limited to 'proto/ospf/ospf.c')
-rw-r--r--proto/ospf/ospf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index f55bec88..7fff7efb 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -208,11 +208,12 @@ ospf_get_route_info(rte *rte, byte *buf, ea_list *attrs)
met='1';
type='E';
}
- //if(rte->u.ospf.type=='E') met='1';
if(rte->u.ospf.metric2!=0) met='2';
if(rte->attrs->source==RTS_OSPF_IA) type='A';
if(rte->attrs->source==RTS_OSPF) type='I';
- buf += bsprintf(buf, " %c%c %d", rte->u.ospf.type, met,
+ 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);
}