From: Daniel Walton Date: Mon, 28 Aug 2017 13:59:38 +0000 (-0700) Subject: Merge branch 'master' of https://github.com/dwalton76/frr into bgpd-draft-ietf-grow... X-Git-Tag: frr-4.0-dev~341^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=31d5efe2ea59ea4bc2e1101127c757129e9a5327;p=mirror_frr.git Merge branch 'master' of https://github.com/dwalton76/frr into bgpd-draft-ietf-grow-bgp-gshut-10 Conflicts: bgpd/bgp_route.c --- 31d5efe2ea59ea4bc2e1101127c757129e9a5327 diff --cc bgpd/bgp_route.c index e12c6fb7d,288271e5a..46227cec7 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@@ -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 [ VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_WITH_LABEL_CMD_STR"]]\ - [<\ - cidr-only\ - |dampening \ - |route-map WORD\ - |prefix-list WORD\ - |filter-list WORD\ - |statistics\ - |community [ [exact-match]]\ - |community-list <(1-500)|WORD> [exact-match]\ - |A.B.C.D/M longer-prefixes\ - |X:X::X:X/M longer-prefixes>\ - ] [json]", + \ + |route-map WORD\ + |prefix-list WORD\ + |filter-list WORD\ + |statistics\ - |community [exact-match]\ ++ |community [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 @@@ -8959,10 -8890,8 +8961,9 @@@ 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); @@@ -9006,21 -8920,14 +8992,17 @@@ 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)) {