From: Ondrej Zajicek Date: Sat, 8 Nov 2014 22:52:42 +0000 (+0100) Subject: Fixes error message in 'show route' cmd. X-Git-Tag: v1.5.0~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0da562a7cb25ed2b8724248ad6f841b1831a09c3;p=thirdparty%2Fbird.git 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. --- diff --git a/nest/rt-table.c b/nest/rt-table.c index 59fd07116..125f1d18e 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"); }