]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge branch 'master' of https://github.com/dwalton76/frr into bgpd-draft-ietf-grow...
authorDaniel Walton <dwalton@cumulusnetworks.com>
Mon, 28 Aug 2017 13:59:38 +0000 (06:59 -0700)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Mon, 28 Aug 2017 13:59:38 +0000 (06:59 -0700)
Conflicts:
bgpd/bgp_route.c

1  2 
bgpd/bgp_route.c
bgpd/bgp_route.h
bgpd/bgp_vty.c
bgpd/bgpd.c
bgpd/bgpd.h

index e12c6fb7d8c61a9e355fa560f52da0c3ff4a9ffc,288271e5a15cdd570c0b4a286381899bfcfea148..46227cec79786c20a234202b5762e7b15c658428
@@@ -8087,10 -8023,11 +8093,11 @@@ static int bgp_show_community_list(stru
  static int bgp_show_prefix_longer(struct vty *vty, struct bgp *bgp,
                                  const char *prefix, afi_t afi, safi_t safi,
                                  enum bgp_show_type type);
- static int bgp_show_regexp(struct vty *vty, const char *regstr, afi_t afi,
+ static int bgp_show_regexp(struct vty *vty, struct bgp *bgp,
+                          const char *regstr, afi_t afi,
                           safi_t safi, enum bgp_show_type type);
 -static int bgp_show_community(struct vty *vty, struct bgp *bgp, int argc,
 -                            struct cmd_token **argv, int exact, afi_t afi,
 +static int bgp_show_community(struct vty *vty, struct bgp *bgp,
 +                            const char *comstr, int exact, afi_t afi,
                              safi_t safi);
  
  static int bgp_show_table(struct vty *vty, struct bgp *bgp,
@@@ -8909,18 -8847,16 +8917,16 @@@ static int bgp_table_stats(struct vty *
  DEFUN (show_ip_bgp,
         show_ip_bgp_cmd,
         "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_WITH_LABEL_CMD_STR"]]\
-           [<\
-              cidr-only\
-              |dampening <flap-statistics|dampened-paths|parameters>\
-              |route-map WORD\
-              |prefix-list WORD\
-              |filter-list WORD\
-              |statistics\
-              |community [<AA:NN|local-AS|no-advertise|no-export|graceful-shutdown> [exact-match]]\
-              |community-list <(1-500)|WORD> [exact-match]\
-              |A.B.C.D/M longer-prefixes\
-              |X:X::X:X/M longer-prefixes>\
-           ] [json]",
+           <dampening <parameters>\
+            |route-map WORD\
+            |prefix-list WORD\
+            |filter-list WORD\
+            |statistics\
 -           |community <AA:NN|local-AS|no-advertise|no-export> [exact-match]\
++           |community <AA:NN|local-AS|no-advertise|no-export|graceful-shutdown> [exact-match]\
+            |community-list <(1-500)|WORD> [exact-match]\
+            |A.B.C.D/M longer-prefixes\
+            |X:X::X:X/M longer-prefixes\
+         >",
         SHOW_STR
         IP_STR
         BGP_STR
        afi_t afi = AFI_IP6;
        safi_t safi = SAFI_UNICAST;
        int exact_match = 0;
-       enum bgp_show_type sh_type = bgp_show_type_normal;
        struct bgp *bgp = NULL;
        int idx = 0;
 +      int idx_community_type = 0;
  
        bgp_vty_find_and_parse_afi_safi_bgp(vty, argv, argc, &idx, &afi, &safi,
                                            &bgp);
  
        if (argv_find(argv, argc, "community", &idx)) {
                /* show a specific community */
 -              if (argv_find(argv, argc, "local-AS", &idx)
 -                  || argv_find(argv, argc, "no-advertise", &idx)
 -                  || argv_find(argv, argc, "no-export", &idx)) {
 -                      if (argv_find(argv, argc, "exact_match", &idx))
 +              if (argv_find(argv, argc, "local-AS", &idx_community_type)
 +                  || argv_find(argv, argc, "no-advertise", &idx_community_type)
 +                  || argv_find(argv, argc, "no-export", &idx_community_type)
 +                  || argv_find(argv, argc, "graceful-shutdown", &idx_community_type)
 +                  || argv_find(argv, argc, "AA:NN", &idx_community_type)) {
 +
 +                      if (argv_find(argv, argc, "exact-match", &idx))
                                exact_match = 1;
 -                      return bgp_show_community(vty, bgp, argc, argv,
 +                      return bgp_show_community(vty, bgp, argv[idx_community_type]->arg,
                                                  exact_match, afi, safi);
                }
-               /* show all communities */
-               else
-                       return bgp_show(vty, bgp, afi, safi,
-                                       bgp_show_type_community_all, NULL, uj);
        }
  
        if (argv_find(argv, argc, "community-list", &idx)) {
Simple merge
diff --cc bgpd/bgp_vty.c
Simple merge
diff --cc bgpd/bgpd.c
Simple merge
diff --cc bgpd/bgpd.h
Simple merge