summaryrefslogtreecommitdiff
path: root/nest/rt-table.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-05-13 11:42:42 +0000
committerMartin Mares <mj@ucw.cz>2000-05-13 11:42:42 +0000
commit9449c91ab2eb962b17989125c712f805f82a092b (patch)
tree786e8faaf9e89eaf1767688857108d2cd6be96a6 /nest/rt-table.c
parent56d6c530eba46dde7280d6743fea7e750f2d5635 (diff)
Added `show route for <prefix-or-ipa>' which looks up route leading to
given network.
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r--nest/rt-table.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index cfaa8937..7133ed49 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -846,7 +846,10 @@ rt_show(struct rt_show_data *d)
}
else
{
- n = fib_find(&d->table->fib, &d->prefix, d->pxlen);
+ if (d->show_for)
+ n = fib_route(&d->table->fib, d->prefix, d->pxlen);
+ else
+ n = fib_find(&d->table->fib, &d->prefix, d->pxlen);
if (n)
{
rt_show_net(this_cli, n, d);