diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2014-11-08 23:52:42 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2014-11-08 23:52:42 +0100 |
commit | 0da562a7cb25ed2b8724248ad6f841b1831a09c3 (patch) | |
tree | b4cb85acd7a88b644ef7f755381d32b933dd1020 /nest/rt-table.c | |
parent | dd5ef279bce002b9942ea437ef80ce3443bbe1dc (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.
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r-- | nest/rt-table.c | 9 |
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"); } |