]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Fix 'show bgp ipv4 vpnv4 statistics' cli
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 26 Jan 2016 14:57:17 +0000 (06:57 -0800)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 26 Jan 2016 14:57:17 +0000 (06:57 -0800)
When attempting to use the 'show bgp ipv4 vpnv4 statistics' cli, the safi
choosen is BGP_MPLS_LABELED_VPN which is #defined to 128.  The afi/safi
combination is fed to bgp->rib, which limits the size of the safi to BGP_SAFI_MAX
which is #defined to 5.   The correct value to use is BGP_MPLS_VPN

The bgp code differentiates between the actual safi value for BGP_MPLS_LABELED_VPN
used defined by RFC 4364, to a internal SAFI value used to limit array size.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_route.c

index b4ba8afe9757d68e83173b2ba7d73b7f33f64f94..492694a94e9d186013c34aa6fc35a6a0c7c61e4e 100644 (file)
@@ -10630,7 +10630,8 @@ bgp_table_stats (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi)
   
   if (!bgp->rib[afi][safi])
     {
-      vty_out (vty, "%% No RIB exist for the AFI/SAFI%s", VTY_NEWLINE);
+      vty_out (vty, "%% No RIB exist's for the AFI(%d)/SAFI(%d)%s",
+              afi, safi, VTY_NEWLINE);
       return CMD_WARNING;
     }
   
@@ -10741,7 +10742,7 @@ bgp_table_stats_vty (struct vty *vty, const char *name,
       else if (strncmp (safi_str, "u", 1) == 0)
         safi = SAFI_UNICAST;
       else if (strncmp (safi_str, "vpnv4", 5) == 0 || strncmp (safi_str, "vpnv6", 5) == 0)
-        safi = SAFI_MPLS_LABELED_VPN;
+        safi = SAFI_MPLS_VPN;
       else
         {
           vty_out (vty, "%% Invalid subsequent address family %s%s",