]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Better rt dumping.
authorOndrej Filip <feela@network.cz>
Tue, 30 May 2000 10:36:57 +0000 (10:36 +0000)
committerOndrej Filip <feela@network.cz>
Tue, 30 May 2000 10:36:57 +0000 (10:36 +0000)
nest/route.h
proto/ospf/ospf.c
proto/ospf/rt.c

index cc81009ec3cc7bb7ece44aa09146dd709f4cc809..640cd490d9e803e2f37e8100b2f50633d870ade0 100644 (file)
@@ -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) */
index f55bec88e6fed6a0f4281635b952f1a1dc8defb4..7fff7efb0d8b6b40bcdf0c58c25722e0d0aa5de1 100644 (file)
@@ -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);
 }
 
index 6b4c18f38a1909146fb117b5a80f43788d4075ec..d50e438a4929c49e151fc4557245a1411e14be49 100644 (file)
@@ -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;