]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: display label as part of the PMSI tunnel attribute
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Tue, 12 Feb 2019 20:53:40 +0000 (12:53 -0800)
committerAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Tue, 12 Feb 2019 21:06:52 +0000 (13:06 -0800)
root@TORS1:~# net show bgp l2vpn evpn route rd 27.0.0.15:4 type multicast
EVPN type-2 prefix: [2]:[ESI]:[EthTag]:[MAClen]:[MAC]
EVPN type-3 prefix: [3]:[EthTag]:[IPlen]:[OrigIP]
EVPN type-5 prefix: [5]:[ESI]:[EthTag]:[IPlen]:[IP]

BGP routing table entry for 27.0.0.15:4:[3]:[0]:[32]:[27.0.0.15]
Paths: (1 available, best #1)
  Advertised to non peer-group peers:
  MSP1(uplink-1) MSP2(uplink-2)
  Route [3]:[0]:[32]:[27.0.0.15] VNI 1003
  Local
    27.0.0.15 from 0.0.0.0 (27.0.0.15)
      Origin IGP, weight 32768, valid, sourced, local, bestpath-from-AS Local, best
      Extended Community: ET:8 RT:5550:1003
      AddPath ID: RX 0, TX 10
      Last update: Thu Feb  7 00:17:24 2019
      PMSI Tunnel Type: Ingress Replication, label: 1003 >>>>>>>>>>>>>

Displayed 1 prefixes (1 paths) with this RD (of requested type)
root@TORS1:~#

Ticket: CM-23790

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
bgpd/bgp_route.c

index 59ca223a2d8f3a997a3a60e77b43bd7838866fee..466d79ff6090f943bd1e406dab5194a00f150510 100644 (file)
@@ -8405,11 +8405,15 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct prefix *p,
                                json_pmsi = json_object_new_object();
                                json_object_string_add(json_pmsi,
                                                       "tunnelType", str);
+                               json_object_int_add(json_pmsi,
+                                               "label",
+                                               label2vni(&attr->label));
                                json_object_object_add(json_path, "pmsi",
                                                       json_pmsi);
                        } else
-                               vty_out(vty, "      PMSI Tunnel Type: %s\n",
-                                       str);
+                               vty_out(vty,
+                                       "      PMSI Tunnel Type: %s, label: %d\n",
+                                       str, label2vni(&attr->label));
                }
 
        }