Don't count networks with no routes (they are not displayed at all and
will be removed during the next garbage collection pass).
This commit is contained in:
parent
23693958aa
commit
0d3070824d
1 changed files with 2 additions and 1 deletions
|
@ -720,7 +720,8 @@ 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);
|
||||||
d->net_counter++;
|
if (n->routes)
|
||||||
|
d->net_counter++;
|
||||||
for(e=n->routes; e; e=e->next)
|
for(e=n->routes; e; e=e->next)
|
||||||
{
|
{
|
||||||
struct ea_list *tmpa, *old_tmpa;
|
struct ea_list *tmpa, *old_tmpa;
|
||||||
|
|
Loading…
Reference in a new issue