0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-23 02:01:55 +00:00

Better rt dumping.

This commit is contained in:
Ondrej Filip 2000-05-30 10:36:57 +00:00
parent 2bdb5e0083
commit 73232f6b18
3 changed files with 3 additions and 8 deletions

View File

@ -163,10 +163,6 @@ typedef struct rte {
struct { struct {
u32 metric1, metric2; /* OSPF Type 1 and Type 2 metrics */ u32 metric1, metric2; /* OSPF Type 1 and Type 2 metrics */
u32 tag; /* External route tag */ u32 tag; /* External route tag */
char type; /* A - intra area
* I - inter area
* E - external
*/
} ospf; } ospf;
#endif #endif
struct { /* Routes generated by krt sync (both temporary and inherited ones) */ struct { /* Routes generated by krt sync (both temporary and inherited ones) */

View File

@ -208,11 +208,12 @@ ospf_get_route_info(rte *rte, byte *buf, ea_list *attrs)
met='1'; met='1';
type='E'; type='E';
} }
//if(rte->u.ospf.type=='E') met='1';
if(rte->u.ospf.metric2!=0) met='2'; if(rte->u.ospf.metric2!=0) met='2';
if(rte->attrs->source==RTS_OSPF_IA) type='A'; if(rte->attrs->source==RTS_OSPF_IA) type='A';
if(rte->attrs->source==RTS_OSPF) type='I'; 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); (rte->u.ospf.metric2==0) ? rte->u.ospf.metric1 : rte->u.ospf.metric2);
} }

View File

@ -229,7 +229,6 @@ again:
e->u.ospf.metric1=nf->metric; e->u.ospf.metric1=nf->metric;
e->u.ospf.metric2=0; e->u.ospf.metric2=0;
e->u.ospf.tag=0; /* FIXME Some config? */ e->u.ospf.tag=0; /* FIXME Some config? */
e->u.ospf.type='I';
e->pflags = 0; e->pflags = 0;
e->net=ne; e->net=ne;
e->pref = p->preference; e->pref = p->preference;
@ -449,7 +448,6 @@ noch:
e->u.ospf.metric1=nf->metric; e->u.ospf.metric1=nf->metric;
e->u.ospf.metric2=nf->metric2; e->u.ospf.metric2=nf->metric2;
e->u.ospf.tag=0; /* FIXME Some config? */ e->u.ospf.tag=0; /* FIXME Some config? */
e->u.ospf.type='E';
e->pflags = 0; e->pflags = 0;
e->net=ne; e->net=ne;
e->pref = p->preference; e->pref = p->preference;