diff options
| author | Don Slice <dslice@cumulusnetworks.com> | 2018-07-17 14:20:52 +0000 |
|---|---|---|
| committer | Don Slice <dslice@cumulusnetworks.com> | 2018-07-17 14:35:33 +0000 |
| commit | fc132690b49f33c0131a3b0d5d7ce3ca174b2ec2 (patch) | |
| tree | 148a32e921f93b320b124dec8b04a25fe14e9520 | |
| parent | 972388dd5c79f195dc7365dfd9e6540578e857c8 (diff) | |
zebra: remove default vrf output for kernel vrf ipv6 blackhole default
It was reported that "show ipv6 route vrf <vrfname>", "show ipv6 route
vrf <vrfname> ::/0 " or "show ipv6 route vrf <vrfname> json" all
displayed that the nexthop was in the default vrf. This was because
the kernel netlink messages would supply the RTA_OIF of the loopback
interface for the kernel-created default route for the vrf, where ipv4
did not supply any RTA_OIF. This fix suppresses the display if the
nexthop and route entry are in different vrfs and the nexthop is
NEXTHOP_TYPE_BLACKHOLE.
Ticket: CM-21722
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
| -rw-r--r-- | zebra/zebra_vty.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 55c4f6e916..1ce8e442fa 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -1198,7 +1198,8 @@ static void vty_show_ip_route_detail(struct vty *vty, struct route_node *rn, break; } - if (re->vrf_id != nexthop->vrf_id) { + if ((re->vrf_id != nexthop->vrf_id) + && !NEXTHOP_TYPE_BLACKHOLE) { struct vrf *vrf = vrf_lookup_by_id(nexthop->vrf_id); @@ -1415,7 +1416,8 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn, break; } - if (nexthop->vrf_id != re->vrf_id) { + if ((nexthop->vrf_id != re->vrf_id) + && !NEXTHOP_TYPE_BLACKHOLE) { struct vrf *vrf = vrf_lookup_by_id(nexthop->vrf_id); @@ -1569,7 +1571,8 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn, break; } - if (nexthop->vrf_id != re->vrf_id) { + if ((nexthop->vrf_id != re->vrf_id) + && !NEXTHOP_TYPE_BLACKHOLE) { struct vrf *vrf = vrf_lookup_by_id(nexthop->vrf_id); if (vrf) |
