]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Don't count networks with no routes (they are not displayed at all and
authorMartin Mares <mj@ucw.cz>
Sun, 7 May 2000 11:32:34 +0000 (11:32 +0000)
committerMartin Mares <mj@ucw.cz>
Sun, 7 May 2000 11:32:34 +0000 (11:32 +0000)
will be removed during the next garbage collection pass).

nest/rt-table.c

index 38253038366e35d3e7309cfee61a5313a26ec95e..f3c7873e2921843489b26dee168bcdc9944c72e2 100644 (file)
@@ -720,7 +720,8 @@ rt_show_net(struct cli *c, net *n, struct rt_show_data *d)
   int ok;
 
   bsprintf(ia, "%I/%d", n->n.prefix, n->n.pxlen);
-  d->net_counter++;
+  if (n->routes)
+    d->net_counter++;
   for(e=n->routes; e; e=e->next)
     {
       struct ea_list *tmpa, *old_tmpa;