Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zebra: fix showing nexthop vrf for ipv6 blackhole #17162

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading