diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index 7867860cbf..59b31072b5 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -919,7 +919,7 @@ static int show_ip_bgp_nexthop_table(struct vty *vty, const char *name, } tree = import_table ? &bgp->import_check_table : &bgp->nexthop_cache_table; - bnc = bnc_find(tree[family2afi(nhop.family)], &nhop, 0, 0); + bnc = bnc_find(&(*tree)[family2afi(nhop.family)], &nhop, 0, 0); if (!bnc) { vty_out(vty, "specified nexthop does not have entry\n"); return CMD_SUCCESS;