diff options
Diffstat (limited to 'nest')
-rw-r--r-- | nest/route.h | 8 | ||||
-rw-r--r-- | nest/rt-table.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/nest/route.h b/nest/route.h index 0634ab7..c41ebf6 100644 --- a/nest/route.h +++ b/nest/route.h @@ -319,10 +319,10 @@ typedef struct rta { protocol-specific metric is availabe */ static inline struct fib *rt_fib(rtable *tab, int cast) { return (cast == RTC_MULTICAST) ? &tab->fib_multicast : &tab->fib_unicast; } -static inline net *net_find2(rtable *tab, ip_addr addr, unsigned len, int cast) { return (net *) fib_find(rt_fib(tab, cast), &addr, len); } -static inline net *net_find(rtable *tab, ip_addr addr, unsigned len) { return net_find2(tab, addr, len, RTC_UNICAST); } -static inline net *net_get2(rtable *tab, ip_addr addr, unsigned len, int cast) { return (net *) fib_get(rt_fib(tab, cast), &addr, len); } -static inline net *net_get(rtable *tab, ip_addr addr, unsigned len) { return net_get2(tab, addr, len, RTC_UNICAST); } +static inline net *net_find_cast(rtable *tab, ip_addr addr, unsigned len, int cast) { return (net *) fib_find(rt_fib(tab, cast), &addr, len); } +static inline net *net_find(rtable *tab, ip_addr addr, unsigned len) { return net_find_cast(tab, addr, len, RTC_UNICAST); } +static inline net *net_get_cast(rtable *tab, ip_addr addr, unsigned len, int cast) { return (net *) fib_get(rt_fib(tab, cast), &addr, len); } +static inline net *net_get(rtable *tab, ip_addr addr, unsigned len) { return net_get_cast(tab, addr, len, RTC_UNICAST); } /* diff --git a/nest/rt-table.c b/nest/rt-table.c index 5d17ca0..1303843 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -1838,8 +1838,8 @@ rt_show(struct rt_show_data *d) } else { - n = net_find2(d->table, d->prefix, d->pxlen, RTC_UNICAST); - n2 = net_find2(d->table, d->prefix, d->pxlen, RTC_MULTICAST); + n = net_find_cast(d->table, d->prefix, d->pxlen, RTC_UNICAST); + n2 = net_find_cast(d->table, d->prefix, d->pxlen, RTC_MULTICAST); } if (n || n2) { |