diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-09-12 20:47:18 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-12 20:47:18 +0300 |
| commit | 0f64a435db8c92b578408b9aab9de29e0b15b4dd (patch) | |
| tree | 710f5de3b6d3ed26d8e4d0441f3c0e4f2c321641 /zebra/zebra_vty.c | |
| parent | 3e2321b88c4d2ff1f3dadfcc1b6cfd8d5e785f87 (diff) | |
| parent | 0789eb69e5b4b1d0b9040cea79cd047ce77b9406 (diff) | |
Merge pull request #9475 from iqras23/change1
bgpd: VRF-Lite fix nexthop type
Diffstat (limited to 'zebra/zebra_vty.c')
| -rw-r--r-- | zebra/zebra_vty.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index b204b30ca7..1c8a1ad09a 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -357,9 +357,11 @@ static void show_nexthop_detail_helper(struct vty *vty, break; } - if ((re->vrf_id != nexthop->vrf_id) - && (nexthop->type != NEXTHOP_TYPE_BLACKHOLE)) - vty_out(vty, "(vrf %s)", vrf_id_to_name(nexthop->vrf_id)); + if (re->vrf_id != nexthop->vrf_id) { + struct vrf *vrf = vrf_lookup_by_id(nexthop->vrf_id); + + vty_out(vty, "(vrf %s)", VRF_LOGNAME(vrf)); + } if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_DUPLICATE)) vty_out(vty, " (duplicate nexthop removed)"); @@ -607,8 +609,7 @@ static void show_route_nexthop_helper(struct vty *vty, break; } - if ((re == NULL || (nexthop->vrf_id != re->vrf_id)) - && (nexthop->type != NEXTHOP_TYPE_BLACKHOLE)) + if ((re == NULL || (nexthop->vrf_id != re->vrf_id))) vty_out(vty, " (vrf %s)", vrf_id_to_name(nexthop->vrf_id)); if (!CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE)) @@ -780,8 +781,7 @@ static void show_nexthop_json_helper(json_object *json_nexthop, break; } - if ((nexthop->vrf_id != re->vrf_id) - && (nexthop->type != NEXTHOP_TYPE_BLACKHOLE)) + if (nexthop->vrf_id != re->vrf_id) json_object_string_add(json_nexthop, "vrf", vrf_id_to_name(nexthop->vrf_id)); |
