Commit 0d307082 authored by Martin Mareš's avatar Martin Mareš
Browse files

Don't count networks with no routes (they are not displayed at all and

will be removed during the next garbage collection pass).
parent 23693958
...@@ -720,6 +720,7 @@ rt_show_net(struct cli *c, net *n, struct rt_show_data *d) ...@@ -720,6 +720,7 @@ rt_show_net(struct cli *c, net *n, struct rt_show_data *d)
int ok; int ok;
bsprintf(ia, "%I/%d", n->n.prefix, n->n.pxlen); bsprintf(ia, "%I/%d", n->n.prefix, n->n.pxlen);
if (n->routes)
d->net_counter++; d->net_counter++;
for(e=n->routes; e; e=e->next) for(e=n->routes; e; e=e->next)
{ {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment