]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: adjust show bgp l2vpn evpn vni command to avoid sanity breakages
authorMitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com>
Thu, 2 Nov 2017 23:33:10 +0000 (16:33 -0700)
committerMitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com>
Thu, 14 Dec 2017 18:57:07 +0000 (10:57 -0800)
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
bgpd/bgp_evpn_vty.c

index b1b3aa94ab1482dbcb653dd4eeac446bacfe1cff..fe0d4c0ca9f93d53a495ca6d811b669264476be7 100644 (file)
@@ -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;