forked from Mirror/frr
Merge pull request #17162 from louis-6wind/fix-bh-nh-vrf
zebra: fix showing nexthop vrf for ipv6 blackhole
This commit is contained in:
commit
91e157f3ae
|
@ -1271,7 +1271,7 @@ void show_nexthop_json_helper(json_object *json_nexthop,
|
||||||
bool display_vrfid = false;
|
bool display_vrfid = false;
|
||||||
uint8_t rn_family;
|
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;
|
display_vrfid = true;
|
||||||
|
|
||||||
if (rn)
|
if (rn)
|
||||||
|
@ -1292,7 +1292,7 @@ void show_route_nexthop_helper(struct vty *vty, const struct route_node *rn,
|
||||||
bool display_vrfid = false;
|
bool display_vrfid = false;
|
||||||
uint8_t rn_family;
|
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;
|
display_vrfid = true;
|
||||||
|
|
||||||
if (rn)
|
if (rn)
|
||||||
|
|
|
@ -370,7 +370,7 @@ static void show_nexthop_detail_helper(struct vty *vty,
|
||||||
break;
|
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);
|
struct vrf *vrf = vrf_lookup_by_id(nexthop->vrf_id);
|
||||||
|
|
||||||
vty_out(vty, "(vrf %s)", VRF_LOGNAME(vrf));
|
vty_out(vty, "(vrf %s)", VRF_LOGNAME(vrf));
|
||||||
|
|
Loading…
Reference in a new issue