summaryrefslogtreecommitdiff
path: root/zebra/zebra_rnh.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2024-10-23 17:34:44 +0300
committerGitHub <noreply@github.com>2024-10-23 17:34:44 +0300
commit91e157f3ae5fabe7b8cc36563cc8c8f9f887cf2f (patch)
tree05a315afd184043734de5246bdf58846afbcc56b /zebra/zebra_rnh.c
parenta6aa6b5880c574e1b61874760ca032e8c5fdc155 (diff)
parent6cdc82b21bb97816f9affd9dcf88c08ad231cc22 (diff)
Merge pull request #17162 from louis-6wind/fix-bh-nh-vrf
zebra: fix showing nexthop vrf for ipv6 blackhole
Diffstat (limited to 'zebra/zebra_rnh.c')
-rw-r--r--zebra/zebra_rnh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c
index 35486a4cd0..640e6551a7 100644
--- a/zebra/zebra_rnh.c
+++ b/zebra/zebra_rnh.c
@@ -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)
@@ -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)