Merge pull request #12047 from donaldsharp/bgp_nexthop_individual

bgpd: Fix `show bgp nexthop A.B.C.D`
This commit is contained in:
Russ White 2022-10-04 07:41:58 -04:00 committed by GitHub
commit 4b72a7be69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;