diff options
author | Ondrej Filip <feela@network.cz> | 2000-05-30 12:36:57 +0200 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2000-05-30 12:36:57 +0200 |
commit | 73232f6b18222d73b38eae58e2c4c90062202709 (patch) | |
tree | 5192f6d9af30473dcdb5fcd5449faf078549ca76 | |
parent | 2bdb5e0083b6f24d29d74bb5e62cd13d724ba54f (diff) | |
download | bird-73232f6b18222d73b38eae58e2c4c90062202709.tar bird-73232f6b18222d73b38eae58e2c4c90062202709.zip |
Better rt dumping.
-rw-r--r-- | nest/route.h | 4 | ||||
-rw-r--r-- | proto/ospf/ospf.c | 5 | ||||
-rw-r--r-- | proto/ospf/rt.c | 2 |
3 files changed, 3 insertions, 8 deletions
diff --git a/nest/route.h b/nest/route.h index cc81009..640cd49 100644 --- a/nest/route.h +++ b/nest/route.h @@ -163,10 +163,6 @@ typedef struct rte { struct { u32 metric1, metric2; /* OSPF Type 1 and Type 2 metrics */ u32 tag; /* External route tag */ - char type; /* A - intra area - * I - inter area - * E - external - */ } ospf; #endif struct { /* Routes generated by krt sync (both temporary and inherited ones) */ diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c index f55bec8..7fff7ef 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); } diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c index 6b4c18f..d50e438 100644 --- a/proto/ospf/rt.c +++ b/proto/ospf/rt.c @@ -229,7 +229,6 @@ again: e->u.ospf.metric1=nf->metric; e->u.ospf.metric2=0; e->u.ospf.tag=0; /* FIXME Some config? */ - e->u.ospf.type='I'; e->pflags = 0; e->net=ne; e->pref = p->preference; @@ -449,7 +448,6 @@ noch: e->u.ospf.metric1=nf->metric; e->u.ospf.metric2=nf->metric2; e->u.ospf.tag=0; /* FIXME Some config? */ - e->u.ospf.type='E'; e->pflags = 0; e->net=ne; e->pref = p->preference; |