]> git.puffer.fish Git - mirror/frr.git/commitdiff
Merge remote-tracking branch 'origin/master' into pr/111
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 27 Jan 2017 16:44:42 +0000 (11:44 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 27 Jan 2017 16:44:42 +0000 (11:44 -0500)
1  2 
bgpd/bgp_encap.c
bgpd/bgp_encap.h
bgpd/bgp_mplsvpn.c
bgpd/bgp_mplsvpn.h
bgpd/bgp_route.c
bgpd/bgp_route.h
bgpd/bgp_vty.c
bgpd/rfapi/bgp_rfapi_cfg.c
bgpd/rfapi/rfapi.c
bgpd/rfapi/rfapi_ap.c
bgpd/rfapi/rfapi_vty.c

Simple merge
index f06dfc128cd472ed077014896196c8f0ca9f5d2f,7442c73c47aadbc255473ba4de1098c834307f5f..0de737c49b1d85640188cc8a90101a1c361f3205
  
  extern void bgp_encap_init (void);
  extern int bgp_nlri_parse_encap (struct peer *, struct attr *, struct bgp_nlri *);
- int
- bgp_show_encap (
-                 struct vty *vty,
-                 afi_t afi,
-                 struct prefix_rd *prd,
-                 enum bgp_show_type type,
-                 void *output_arg,
-                 int tags);
++extern int bgp_show_encap (struct vty *vty, afi_t afi, struct prefix_rd *prd,
++                           enum bgp_show_type type, void *output_arg, int tags);
  
  #include "bgp_encap_types.h"
  #endif /* _QUAGGA_BGP_ENCAP_H */
index 7a2717acc085320086bd3d6884d69c02bed007da,6575189ab172084ff3ab0ac11e17e253f7c96ce5..6e722bbb554298411eca9bc5afc0c84e02ad6c79
@@@ -732,8 -733,25 +733,9 @@@ show_adj_route_vpn (struct vty *vty, st
      }
    return CMD_SUCCESS;
  }
+ #endif
  
 -enum bgp_show_type
 -{
 -  bgp_show_type_normal,
 -  bgp_show_type_regexp,
 -  bgp_show_type_prefix_list,
 -  bgp_show_type_filter_list,
 -  bgp_show_type_neighbor,
 -  bgp_show_type_cidr_only,
 -  bgp_show_type_prefix_longer,
 -  bgp_show_type_community_all,
 -  bgp_show_type_community,
 -  bgp_show_type_community_exact,
 -  bgp_show_type_community_list,
 -  bgp_show_type_community_list_exact
 -};
 -
 -static int
 +int
  bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,
                   enum bgp_show_type type, void *output_arg, int tags, u_char use_json)
  {
index 97eed3c35adfa38033784bcb90906a7960e8d9c3,234cf9baa299c28e089858d3f3a8fad004e295bb..ea6cbcd272c270094c20b56499c0f0263914657c
@@@ -100,8 -106,5 +106,7 @@@ extern char *prefix_rd2str (struct pref
  
  extern int
  argv_find_and_parse_vpnvx(struct cmd_token **argv, int argc, int *index, afi_t *afi);
- int
- bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,
-                  enum bgp_show_type type, void *output_arg, int tags, u_char use_json);
++extern int bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,
++                              enum bgp_show_type type, void *output_arg, int tags, u_char use_json);
  
  #endif /* _QUAGGA_BGP_MPLSVPN_H */
index eea0f86b349ba67c21833137d65688618fad1b0d,ca96bae020ae98bfa746b4340272368b2849b400..fb33b234f47ebd4c5aebff3403448fa03223862c
@@@ -7214,8 -7220,32 +7221,8 @@@ route_vty_out_detail (struct vty *vty, 
  #define BGP_SHOW_DAMP_HEADER "   Network          From             Reuse    Path%s"
  #define BGP_SHOW_FLAP_HEADER "   Network          From            Flaps Duration Reuse    Path%s"
  
 -enum bgp_show_type
 -{
 -  bgp_show_type_normal,
 -  bgp_show_type_regexp,
 -  bgp_show_type_prefix_list,
 -  bgp_show_type_filter_list,
 -  bgp_show_type_route_map,
 -  bgp_show_type_neighbor,
 -  bgp_show_type_cidr_only,
 -  bgp_show_type_prefix_longer,
 -  bgp_show_type_community_all,
 -  bgp_show_type_community,
 -  bgp_show_type_community_exact,
 -  bgp_show_type_community_list,
 -  bgp_show_type_community_list_exact,
 -  bgp_show_type_lcommunity_all,
 -  bgp_show_type_lcommunity,
 -  bgp_show_type_lcommunity_list,
 -  bgp_show_type_flap_statistics,
 -  bgp_show_type_flap_neighbor,
 -  bgp_show_type_dampend_paths,
 -  bgp_show_type_damp_neighbor
 -};
 -
  static int
- bgp_show_prefix_list (struct vty *vty, const char *name,
+ bgp_show_prefix_list (struct vty *vty, struct bgp *bgp,
                        const char *prefix_list_str, afi_t afi,
                        safi_t safi, enum bgp_show_type type);
  static int
@@@ -7935,23 -8112,18 +8089,24 @@@ DEFUN (show_ip_bgp
        else
          return bgp_show (vty, bgp, afi, safi, bgp_show_type_community_all, NULL, uj);
      }
-     else if (strmatch(argv[idx]->text, "community-list"))
-       {
-         const char *clist_number_or_name = argv[++idx]->arg;
-         if (++idx < argc && strmatch (argv[idx]->arg, "exact-match"))
-           exact_match = 1;
-         return bgp_show_community_list (vty, vrf, clist_number_or_name, exact_match, afi, safi);
-       }
-     /* prefix-longer */
-     else if (argv[idx]->type == IPV4_TKN || argv[idx]->type == IPV6_TKN)
-       return bgp_show_prefix_longer (vty, vrf, argv[idx + 1]->arg, afi, safi, bgp_show_type_prefix_longer);
-   }
++
+   if (argv_find(argv, argc, "community-list", &idx))
+     {
+       const char *clist_number_or_name = argv[++idx]->arg;
+       if (++idx < argc && strmatch (argv[idx]->text, "exact-match"))
+         exact_match = 1;
+       return bgp_show_community_list (vty, bgp, clist_number_or_name, exact_match, afi, safi);
+     }
+   /* prefix-longer */
+   if (argv_find(argv, argc, "A.B.C.D/M", &idx) || argv_find(argv, argc, "X:X::X:X/M", &idx))
+     return bgp_show_prefix_longer (vty, bgp, argv[idx + 1]->arg, afi, safi, bgp_show_type_prefix_longer);
 -  return bgp_show (vty, bgp, afi, safi, sh_type, NULL, uj);
 +  if (safi == SAFI_MPLS_VPN)
 +    return bgp_show_mpls_vpn (vty, afi, NULL, bgp_show_type_normal, NULL, 0, uj);
 +  else if (safi == SAFI_ENCAP)
 +    return bgp_show_encap (vty, afi, NULL, bgp_show_type_normal, NULL, 0);
 +  else
 +    return bgp_show (vty, bgp, afi, safi, sh_type, NULL, uj);
  }
  
  DEFUN (show_ip_bgp_route,
index f2e6273b84f73fd622804604666291940bde720f,3c7aa83a0e4da84276c201ad8c79a54c796cec24..2103338b7d6d5ee41c0fdc7f4c83c1bed8038cf8
@@@ -26,28 -26,6 +26,31 @@@ Software Foundation, Inc., 59 Temple Pl
  
  struct bgp_nexthop_cache;
  
 +enum bgp_show_type
 +{
 +  bgp_show_type_normal,
 +  bgp_show_type_regexp,
 +  bgp_show_type_prefix_list,
 +  bgp_show_type_filter_list,
 +  bgp_show_type_route_map,
 +  bgp_show_type_neighbor,
 +  bgp_show_type_cidr_only,
 +  bgp_show_type_prefix_longer,
 +  bgp_show_type_community_all,
 +  bgp_show_type_community,
 +  bgp_show_type_community_exact,
 +  bgp_show_type_community_list,
 +  bgp_show_type_community_list_exact,
++  bgp_show_type_lcommunity_all,
++  bgp_show_type_lcommunity,
++  bgp_show_type_lcommunity_list,
 +  bgp_show_type_flap_statistics,
 +  bgp_show_type_flap_neighbor,
 +  bgp_show_type_dampend_paths,
 +  bgp_show_type_damp_neighbor
 +};
 +
 +
  #define BGP_SHOW_SCODE_HEADER "Status codes: s suppressed, d damped, "\
                                "h history, * valid, > best, = multipath,%s"\
                  "              i internal, r RIB-failure, S Stale, R Removed%s"
diff --cc bgpd/bgp_vty.c
index 80efe5f591b63736590619c4652ff253f3a3dc1a,d9043e520d0b7a6b8ef0ddf11e5f1a31c8363449..94809d69f5c33e411b3fcdf64f9e45a28c7eb5ab
@@@ -44,11 -45,11 +45,11 @@@ Software Foundation, Inc., 59 Temple Pl
  #include "bgpd/bgp_damp.h"
  #include "bgpd/bgp_debug.h"
  #include "bgpd/bgp_fsm.h"
--#include "bgpd/bgp_mplsvpn.h"
  #include "bgpd/bgp_nexthop.h"
  #include "bgpd/bgp_open.h"
  #include "bgpd/bgp_regex.h"
  #include "bgpd/bgp_route.h"
++#include "bgpd/bgp_mplsvpn.h"
  #include "bgpd/bgp_zebra.h"
  #include "bgpd/bgp_table.h"
  #include "bgpd/bgp_vty.h"
@@@ -5586,7 -5673,29 +5673,7 @@@ DEFUN (address_family_vpnv6
    vty->node = BGP_VPNV6_NODE;
    return CMD_SUCCESS;
  }
 -
 -DEFUN (address_family_ipv4_vpn,
 -       address_family_ipv4_vpn_cmd,
 -       "address-family ipv4 vpn",
 -       "Enter Address Family command mode\n"
 -       "Address Family\n"
 -       "Subsequent Address Family modifier\n")
 -{
 -  vty->node = BGP_VPNV4_NODE;
 -  return CMD_SUCCESS;
 -}
 -
 -DEFUN (address_family_ipv6_vpn,
 -       address_family_ipv6_vpn_cmd,
 -       "address-family ipv6 vpn",
 -       "Enter Address Family command mode\n"
 -       "Address Family\n"
 -       "Subsequent Address Family modifier\n")
 -{
 -  vty->node = BGP_VPNV6_NODE;
 -  return CMD_SUCCESS;
 -}
--#endif /* KEEP_OLD_VPN_COMMANDS */
++#endif
  
  DEFUN (address_family_encap,
         address_family_encap_cmd,
@@@ -10694,7 -10843,10 +10821,8 @@@ bgp_vty_init (void
  #ifdef KEEP_OLD_VPN_COMMANDS
    install_element (BGP_NODE, &address_family_vpnv4_cmd);
    install_element (BGP_NODE, &address_family_vpnv6_cmd);
 -  install_element (BGP_NODE, &address_family_ipv4_vpn_cmd);
 -  install_element (BGP_NODE, &address_family_ipv6_vpn_cmd);
  #endif /* KEEP_OLD_VPN_COMMANDS */
    install_element (BGP_NODE, &address_family_encap_cmd);
    install_element (BGP_NODE, &address_family_encapv6_cmd);
  
index ab9a24e831cfb2e2c1979ab6e27b9f2b938d307d,10b365c1c87f2b8dbed6a4a2f12c7ef9436933df..8ff28a39d78db1986e0351ed8ba0f9b0d6f162e3
@@@ -30,8 -30,8 +30,8 @@@
  
  #include "bgpd/bgpd.h"
  #include "bgpd/bgp_attr.h"
--#include "bgpd/bgp_mplsvpn.h"
  #include "bgpd/bgp_route.h"
++#include "bgpd/bgp_mplsvpn.h"
  
  #include "bgpd/bgp_ecommunity.h"
  #include "bgpd/rfapi/rfapi.h"
index 61da18a3084db6d33513a8ea01208a4d1f07828b,c195d09ce7f462b8fcd1e68922566b5b6e33675d..cc6b555c9d7987fef3c24f4136bd273a8a8bb2e4
  #include "bgpd/bgpd.h"
  #include "bgpd/bgp_ecommunity.h"
  #include "bgpd/bgp_attr.h"
--#include "bgpd/bgp_mplsvpn.h"
  
  #include "bgpd/rfapi/bgp_rfapi_cfg.h"
  #include "bgpd/rfapi/rfapi.h"
  #include "bgpd/rfapi/rfapi_backend.h"
  
  #include "bgpd/bgp_route.h"
++#include "bgpd/bgp_mplsvpn.h"
  #include "bgpd/bgp_aspath.h"
  #include "bgpd/bgp_advertise.h"
  #include "bgpd/bgp_vnc_types.h"
index 4b8eb9511b363df43a13815e1f22c8a2bdebdbd0,4c415504fa3f6a04a51e89ec962f80d9ee9b6fa2..5cc1dd78157c658e2b9a5ee6633c357646166803
  #include "bgpd/bgpd.h"
  #include "bgpd/bgp_ecommunity.h"
  #include "bgpd/bgp_attr.h"
--#include "bgpd/bgp_mplsvpn.h"
  
  #include "bgpd/rfapi/bgp_rfapi_cfg.h"
  #include "bgpd/rfapi/rfapi.h"
  #include "bgpd/rfapi/rfapi_backend.h"
  
  #include "bgpd/bgp_route.h"
++#include "bgpd/bgp_mplsvpn.h"
  #include "bgpd/bgp_aspath.h"
  #include "bgpd/bgp_advertise.h"
  
Simple merge