]> git.puffer.fish Git - matthieu/frr.git/commitdiff
Merge remote-tracking branch 'origin/pr/113' into pr/111
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 27 Jan 2017 17:39:06 +0000 (12:39 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 27 Jan 2017 17:39:06 +0000 (12:39 -0500)
1  2 
bgpd/bgp_encap.c
bgpd/bgp_mplsvpn.c
bgpd/bgp_mplsvpn.h
bgpd/bgp_route.c
bgpd/rfapi/rfapi.c

Simple merge
index 6e722bbb554298411eca9bc5afc0c84e02ad6c79,e0b14a6e4c70d10748634315f0b019083400b138..d13de9b9e65f3e36f6a0bf8cbbc6d7a203af7c6a
@@@ -953,20 -935,41 +937,60 @@@ bgp_show_mpls_vpn (struct vty *vty, afi
    return CMD_SUCCESS;
  }
  
 +#ifdef KEEP_OLD_VPN_COMMANDS
 +DEFUN (show_ip_bgp_vpn_all,
 +       show_ip_bgp_vpn_all_cmd,
 +       "show [ip] bgp <vpnv4|vpnv6>",
 +       SHOW_STR
 +       IP_STR
 +       BGP_STR
 +       BGP_VPNVX_HELP_STR)
 +{
 +  afi_t afi;
 +  int idx = 0;
 +
 +  if (argv_find_and_parse_vpnvx (argv, argc, &idx, &afi))
 +    return bgp_show_mpls_vpn (vty, afi, NULL, bgp_show_type_normal, NULL, 0, 0);
++
++  return CMD_SUCCESS;
++}
++#endif
++
+ DEFUN (show_bgp_ip_vpn_all_rd,
+        show_bgp_ip_vpn_all_rd_cmd,
+        "show bgp "BGP_AFI_CMD_STR" vpn all [rd ASN:nn_or_IP-address:nn] [json]",
+        SHOW_STR
+        IP_STR
+        BGP_STR
+        BGP_VPNVX_HELP_STR
+        "Display VPN NLRI specific information\n"
+        "Display information for a route distinguisher\n"
+        "VPN Route Distinguisher\n"
+        JSON_STR)
+ {
+   int idx_rd = 5;
+   int ret;
+   struct prefix_rd prd;
+   afi_t afi;
+   int idx = 0;
+   if (argv_find_and_parse_afi (argv, argc, &idx, &afi))
+     {
+       if (argc >= 7 &&  argv[idx_rd]->arg)
+         {
+           ret = str2prefix_rd (argv[idx_rd]->arg, &prd);
+           if (! ret)
+             {
+               vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE);
+               return CMD_WARNING;
+             }
+           return bgp_show_mpls_vpn (vty, afi, &prd, bgp_show_type_normal, NULL, 0, use_json (argc, argv));
+         }
+       else
+         {
+           return bgp_show_mpls_vpn (vty, afi, NULL, bgp_show_type_normal, NULL, 0, use_json (argc, argv));
+         }
+     }
    return CMD_SUCCESS;
  }
  
Simple merge
index fb33b234f47ebd4c5aebff3403448fa03223862c,a3dd5f7cf5ad78960e3e6cf6fa3aaa824f3019a7..9fffde13ad398739bd71f6619ea68ff0761d6a68
@@@ -7971,12 -8044,10 +8022,12 @@@ DEFUN (show_ip_bgp_large_community
      return bgp_show (vty, bgp, afi, safi, bgp_show_type_lcommunity_all, NULL, uj);
  }
  
 +static int bgp_table_stats (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi);
 +
  /* BGP route print out function. */
 -DEFUN (show_ip_bgp_ipv4,
 -       show_ip_bgp_ipv4_cmd,
 +DEFUN (show_ip_bgp,
 +       show_ip_bgp_cmd,
-        "show [ip] bgp [<view|vrf> WORD] [<ipv4|ipv6> [<unicast|multicast|vpn|encap>]]\
+        "show [ip] bgp [<view|vrf> WORD] ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]]\
            [<\
               cidr-only\
               |dampening <flap-statistics|dampened-paths|parameters>\
@@@ -8194,17 -8247,12 +8237,13 @@@ DEFUN (show_ip_bgp_route
  
  DEFUN (show_ip_bgp_regexp,
         show_ip_bgp_regexp_cmd,
-        "show [ip] bgp [<view|vrf> WORD] [<ipv4|ipv6> [<unicast|multicast|vpn|encap>]] regexp REGEX...",
 -       "show [ip] bgp ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] regexp REGEX...",
++       "show [ip] bgp [<view|vrf> WORD] ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] regexp REGEX...",
         SHOW_STR
         IP_STR
         BGP_STR
-        "Address Family\n"
-        "Address Family\n"
-        "Address Family modifier\n"
-        "Address Family modifier\n"
-        "Address Family modifier\n"
-        "Address Family modifier\n"
 +       BGP_INSTANCE_HELP_STR
+        BGP_AFI_HELP_STR
+        BGP_SAFI_HELP_STR
         "Display routes matching the AS path regular expression\n"
         "A regular-expression to match the BGP AS paths\n")
  {
@@@ -8234,15 -8283,10 +8273,11 @@@ DEFUN (show_ip_bgp_instance_all
         IP_STR
         BGP_STR
         BGP_INSTANCE_ALL_HELP_STR
-        "Address Family\n"
-        "Address Family\n"
-        "Address Family modifier\n"
-        "Address Family modifier\n"
-        "Address Family modifier\n"
-        "Address Family modifier\n"
+        BGP_AFI_HELP_STR
+        BGP_SAFI_HELP_STR
         JSON_STR)
  {
 +  vrf_id_t vrf = VRF_DEFAULT;
    afi_t afi = AFI_IP;
    safi_t safi = SAFI_UNICAST;
  
@@@ -9269,18 -9586,13 +9304,12 @@@ peer_adj_routes (struct vty *vty, struc
  
  DEFUN (show_ip_bgp_instance_neighbor_advertised_route,
         show_ip_bgp_instance_neighbor_advertised_route_cmd,
-        "show [ip] bgp [<view|vrf> WORD] [<ipv4|ipv6> [<unicast|multicast|vpn|encap>]] "
 -       "show [ip] bgp [<view|vrf> WORD] ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] neighbors <A.B.C.D|X:X::X:X|WORD> <received-routes|advertised-routes> [route-map WORD] [json]",
++       "show [ip] bgp [<view|vrf> WORD] ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] "
 +       "neighbors <A.B.C.D|X:X::X:X|WORD> [<received-routes|advertised-routes> [route-map WORD]] [json]",
         SHOW_STR
         IP_STR
         BGP_STR
         BGP_INSTANCE_HELP_STR
-        "Address Family\n"
-        "Address Family\n"
-        "Address Family modifier\n"
-        "Address Family modifier\n"
-        "Address Family modifier\n"
-        "Address Family modifier\n"
 -       BGP_AFI_HELP_STR
 -       BGP_SAFI_HELP_STR
         "Detailed information on TCP and BGP neighbor connections\n"
         "Neighbor to display information about\n"
         "Neighbor to display information about\n"
@@@ -9454,8 -9761,7 +9483,8 @@@ bgp_show_neighbor_route (struct vty *vt
  
  DEFUN (show_ip_bgp_neighbor_routes,
         show_ip_bgp_neighbor_routes_cmd,
-        "show [ip] bgp [<view|vrf> WORD] [<ipv4|ipv6> [<unicast|multicast|vpn|encap>]] "
 -       "show [ip] bgp [<view|vrf> WORD] ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] neighbors <A.B.C.D|X:X::X:X|WORD> <flap-statistics|dampened-routes|routes> [json]",
++       "show [ip] bgp [<view|vrf> WORD] ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] "
 +       "neighbors <A.B.C.D|X:X::X:X|WORD> <flap-statistics|dampened-routes|routes> [json]",
         SHOW_STR
         IP_STR
         BGP_STR
Simple merge