Skip to content

Commit

Permalink
Merge pull request FRRouting#17162 from louis-6wind/fix-bh-nh-vrf
Browse files Browse the repository at this point in the history
zebra: fix showing nexthop vrf for ipv6 blackhole
  • Loading branch information
ton31337 authored Oct 23, 2024
2 parents a6aa6b5 + 6cdc82b commit 91e157f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions zebra/zebra_rnh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ void show_nexthop_json_helper(json_object *json_nexthop,
bool display_vrfid = false;
uint8_t rn_family;

if (re == NULL || nexthop->vrf_id != re->vrf_id)
if ((re == NULL || nexthop->vrf_id != re->vrf_id) && nexthop->type != NEXTHOP_TYPE_BLACKHOLE)
display_vrfid = true;

if (rn)
Expand All @@ -1292,7 +1292,7 @@ void show_route_nexthop_helper(struct vty *vty, const struct route_node *rn,
bool display_vrfid = false;
uint8_t rn_family;

if (re == NULL || nexthop->vrf_id != re->vrf_id)
if ((re == NULL || nexthop->vrf_id != re->vrf_id) && nexthop->type != NEXTHOP_TYPE_BLACKHOLE)
display_vrfid = true;

if (rn)
Expand Down
2 changes: 1 addition & 1 deletion zebra/zebra_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ static void show_nexthop_detail_helper(struct vty *vty,
break;
}

if (re->vrf_id != nexthop->vrf_id) {
if (re->vrf_id != nexthop->vrf_id && nexthop->type != NEXTHOP_TYPE_BLACKHOLE) {
struct vrf *vrf = vrf_lookup_by_id(nexthop->vrf_id);

vty_out(vty, "(vrf %s)", VRF_LOGNAME(vrf));
Expand Down

0 comments on commit 91e157f

Please sign in to comment.