diff options
| author | Mitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com> | 2017-11-02 16:33:10 -0700 |
|---|---|---|
| committer | Mitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com> | 2017-12-14 10:57:07 -0800 |
| commit | 6be9a2087f9f5ff1502bef5f1a8f03c9233ad787 (patch) | |
| tree | 4b22535b385ad3600ea41bad3aeff1c5dca79659 | |
| parent | 964ec8866fd025d565628d1f1c383556e24ba8bc (diff) | |
bgpd: adjust show bgp l2vpn evpn vni command to avoid sanity breakages
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
| -rw-r--r-- | bgpd/bgp_evpn_vty.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index b1b3aa94ab..fe0d4c0ca9 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -607,9 +607,8 @@ static void show_vni_entry(struct hash_backet *backet, void *args[]) json_vni, "rd", prefix_rd2str(&vpn->prd, buf2, sizeof(buf2))); } else { - vty_out(vty, "%-1s %-10u %-15s %-37s %-21s", buf1, vpn->vni, + vty_out(vty, "%-1s %-10u %-15s %-21s", buf1, vpn->vni, inet_ntoa(vpn->originator_ip), - vrf_id_to_name(vpn->tenant_vrf_id), prefix_rd2str(&vpn->prd, buf2, RD_ADDRSTRLEN)); } @@ -662,6 +661,9 @@ static void show_vni_entry(struct hash_backet *backet, void *args[]) break; } + if (!json) + vty_out(vty, "%-37s", vrf_id_to_name(vpn->tenant_vrf_id)); + if (json) { char vni_str[VNI_STR_LEN]; @@ -2170,9 +2172,9 @@ static void evpn_show_all_vnis(struct vty *vty, struct bgp *bgp, } else { vty_out(vty, "Number of VNIs: %u\n", num_vnis); vty_out(vty, "Flags: * - Kernel\n"); - vty_out(vty, " %-10s %-15s %-37s %-21s %-25s %-25s\n", "VNI", - "Orig IP", "Tenant-Vrf", "RD", "Import RT", - "Export RT"); + vty_out(vty, " %-10s %-15s %-21s %-25s %-25s %-37s\n", "VNI", + "Orig IP", "RD", "Import RT", + "Export RT", "Tenant-Vrf"); } args[0] = vty; |
