summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2014-11-08 23:52:42 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2014-11-08 23:52:42 +0100
commit0da562a7cb25ed2b8724248ad6f841b1831a09c3 (patch)
treeb4cb85acd7a88b644ef7f755381d32b933dd1020
parentdd5ef279bce002b9942ea437ef80ce3443bbe1dc (diff)
Fixes error message in 'show route' cmd.
Message 'Network not in table' was not reported if a network node without any routes was found in a routing table.
-rw-r--r--nest/rt-table.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 59fd0711..125f1d18 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -2409,11 +2409,12 @@ rt_show(struct rt_show_data *d)
n = net_route(d->table, d->prefix, d->pxlen);
else
n = net_find(d->table, d->prefix, d->pxlen);
+
if (n)
- {
- rt_show_net(this_cli, n, d);
- cli_msg(0, "");
- }
+ rt_show_net(this_cli, n, d);
+
+ if (d->rt_counter)
+ cli_msg(0, "");
else
cli_msg(8001, "Network not in table");
}