diff options
Diffstat (limited to 'bgpd/bgp_vty.c')
| -rw-r--r-- | bgpd/bgp_vty.c | 68 |
1 files changed, 27 insertions, 41 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 6e998085c1..710aa926ad 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -517,6 +517,9 @@ bgp_vty_return (struct vty *vty, int ret) case BGP_ERR_INVALID_FOR_DIRECT_PEER: str = "Operation not allowed on a directly connected neighbor"; break; + case BGP_ERR_PEER_SAFI_CONFLICT: + str = "Cannot activate peer for both 'ipv4 unicast' and 'ipv4 labeled-unicast'"; + break; } if (str) { @@ -1376,7 +1379,6 @@ DEFUN (bgp_update_delay_establish_wait, "update-delay (0-3600) (1-3600)", "Force initial delay for best-path and updates\n" "Seconds\n" - "Wait for peers to be established\n" "Seconds\n") { int idx_number = 1; @@ -1391,7 +1393,7 @@ DEFUN (no_bgp_update_delay, NO_STR "Force initial delay for best-path and updates\n" "Seconds\n" - "Wait for peers to be established\n") + "Seconds\n") { return bgp_update_delay_deconfig_vty(vty); } @@ -3259,10 +3261,7 @@ DEFUN (neighbor_activate, return CMD_WARNING; ret = peer_activate (peer, bgp_node_afi (vty), bgp_node_safi (vty)); - - if (ret) - return CMD_WARNING; - return CMD_SUCCESS; + return bgp_vty_return (vty, ret); } ALIAS_HIDDEN (neighbor_activate, @@ -3290,10 +3289,7 @@ DEFUN (no_neighbor_activate, return CMD_WARNING; ret = peer_deactivate (peer, bgp_node_afi (vty), bgp_node_safi (vty)); - - if (ret) - return CMD_WARNING; - return CMD_SUCCESS; + return bgp_vty_return (vty, ret); } ALIAS_HIDDEN (no_neighbor_activate, @@ -6182,7 +6178,7 @@ DEFUN_NOSH (address_family_ipv4_safi, "address-family ipv4 [<unicast|multicast|vpn|labeled-unicast>]", "Enter Address Family command mode\n" "Address Family\n" - BGP_SAFI_HELP_STR) + BGP_SAFI_WITH_LABEL_HELP_STR) { if (argc == 3) @@ -6201,7 +6197,7 @@ DEFUN_NOSH (address_family_ipv6_safi, "address-family ipv6 [<unicast|multicast|vpn|labeled-unicast>]", "Enter Address Family command mode\n" "Address Family\n" - BGP_SAFI_HELP_STR) + BGP_SAFI_WITH_LABEL_HELP_STR) { if (argc == 3) { @@ -6240,11 +6236,10 @@ DEFUN_NOSH (address_family_vpnv6, DEFUN_NOSH (address_family_evpn, address_family_evpn_cmd, - "address-family <l2vpn evpn>", + "address-family l2vpn evpn", "Enter Address Family command mode\n" - "EVPN Address family\n" - "Layer2 VPN Address family\n" - "Ethernet Virtual Private Network Subsequent Address Family\n") + "Address Family\n" + "Address Family modifier\n") { vty->node = BGP_EVPN_NODE; return CMD_SUCCESS; @@ -6352,7 +6347,7 @@ bgp_clear_prefix (struct vty *vty, const char *view_name, const char *ip_str, /* one clear bgp command to rule them all */ DEFUN (clear_ip_bgp_all, clear_ip_bgp_all_cmd, - "clear [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] <*|A.B.C.D|X:X::X:X|WORD|(1-4294967295)|external|peer-group WORD> [<soft [<in|out>]|in [prefix-filter]|out>]", + "clear [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_WITH_LABEL_CMD_STR"]] <*|A.B.C.D|X:X::X:X|WORD|(1-4294967295)|external|peer-group WORD> [<soft [<in|out>]|in [prefix-filter]|out>]", CLEAR_STR IP_STR BGP_STR @@ -6366,7 +6361,7 @@ DEFUN (clear_ip_bgp_all, "Clear all members of peer-group\n" "BGP peer-group name\n" BGP_AFI_HELP_STR - BGP_SAFI_HELP_STR + BGP_SAFI_WITH_LABEL_HELP_STR BGP_SOFT_STR BGP_SOFT_IN_STR BGP_SOFT_OUT_STR @@ -6387,12 +6382,18 @@ DEFUN (clear_ip_bgp_all, /* clear [ip] bgp */ if (argv_find (argv, argc, "ip", &idx)) afi = AFI_IP; + /* [<view|vrf> VIEWVRFNAME] */ if (argv_find (argv, argc, "view", &idx) || argv_find (argv, argc, "vrf", &idx)) { vrf = argv[idx + 1]->arg; idx += 2; } + + /* ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] */ + if (argv_find_and_parse_afi (argv, argc, &idx, &afi)) + argv_find_and_parse_safi (argv, argc, &idx, &safi); + /* <*|A.B.C.D|X:X::X:X|WORD|(1-4294967295)|external|peer-group WORD> */ if (argv_find (argv, argc, "*", &idx)) { @@ -6428,11 +6429,7 @@ DEFUN (clear_ip_bgp_all, { clr_sort = clear_external; } - /* ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] */ - if (argv_find_and_parse_afi (argv, argc, &idx, &afi)) - { - argv_find_and_parse_safi (argv, argc, &idx, &safi); - } + /* [<soft [<in|out>]|in [prefix-filter]|out>] */ if (argv_find (argv, argc, "soft", &idx)) { @@ -7327,13 +7324,13 @@ bgp_show_summary_vty (struct vty *vty, const char *name, /* `show [ip] bgp summary' commands. */ DEFUN (show_ip_bgp_summary, show_ip_bgp_summary_cmd, - "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] summary [json]", + "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_WITH_LABEL_CMD_STR"]] summary [json]", SHOW_STR IP_STR BGP_STR BGP_INSTANCE_HELP_STR BGP_AFI_HELP_STR - BGP_SAFI_HELP_STR + BGP_SAFI_WITH_LABEL_HELP_STR "Summary of BGP neighbor status\n" JSON_STR) { @@ -9463,13 +9460,13 @@ bgp_show_update_groups(struct vty *vty, const char *name, DEFUN (show_ip_bgp_updgrps, show_ip_bgp_updgrps_cmd, - "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] update-groups [SUBGROUP-ID]", + "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_WITH_LABEL_CMD_STR"]] update-groups [SUBGROUP-ID]", SHOW_STR IP_STR BGP_STR BGP_INSTANCE_HELP_STR BGP_AFI_HELP_STR - BGP_SAFI_HELP_STR + BGP_SAFI_WITH_LABEL_HELP_STR "Detailed info about dynamic update groups\n" "Specific subgroup to display detailed info for\n") { @@ -9620,8 +9617,7 @@ DEFUN (show_bgp_updgrps_afi_adj, "Detailed info about dynamic update groups\n" "Advertisement queue\n" "Announced routes\n" - "Packet queue\n" - "Specific subgroup info wanted for\n") + "Packet queue\n") { int idx_afi = 2; int idx_safi = 3; @@ -9726,8 +9722,7 @@ DEFUN (show_bgp_updgrps_afi_adj_s, "Specific subgroup to display info for\n" "Advertisement queue\n" "Announced routes\n" - "Packet queue\n" - "Specific subgroup info wanted for\n") + "Packet queue\n") { int idx_afi = 2; int idx_safi = 3; @@ -10879,14 +10874,8 @@ bgp_vty_init (void) install_element (BGP_IPV6_NODE, &bgp_maxpaths_ibgp_cluster_cmd); install_element (BGP_IPV6_NODE, &no_bgp_maxpaths_ibgp_cmd); - install_element (BGP_IPV4L_NODE, &bgp_maxpaths_cmd); - install_element (BGP_IPV4L_NODE, &no_bgp_maxpaths_cmd); install_element (BGP_IPV6L_NODE, &bgp_maxpaths_cmd); install_element (BGP_IPV6L_NODE, &no_bgp_maxpaths_cmd); - - install_element (BGP_IPV4L_NODE, &bgp_maxpaths_ibgp_cmd); - install_element (BGP_IPV4L_NODE, &bgp_maxpaths_ibgp_cluster_cmd); - install_element (BGP_IPV4L_NODE, &no_bgp_maxpaths_ibgp_cmd); install_element (BGP_IPV6L_NODE, &bgp_maxpaths_ibgp_cmd); install_element (BGP_IPV6L_NODE, &bgp_maxpaths_ibgp_cluster_cmd); install_element (BGP_IPV6L_NODE, &no_bgp_maxpaths_ibgp_cmd); @@ -11043,7 +11032,6 @@ bgp_vty_init (void) install_element (BGP_NODE, &neighbor_set_peer_group_cmd); install_element (BGP_IPV4_NODE, &neighbor_set_peer_group_hidden_cmd); install_element (BGP_IPV4M_NODE, &neighbor_set_peer_group_hidden_cmd); - install_element (BGP_IPV4L_NODE, &neighbor_set_peer_group_hidden_cmd); install_element (BGP_IPV6_NODE, &neighbor_set_peer_group_hidden_cmd); install_element (BGP_IPV6M_NODE, &neighbor_set_peer_group_hidden_cmd); install_element (BGP_IPV6L_NODE, &neighbor_set_peer_group_hidden_cmd); @@ -11054,7 +11042,6 @@ bgp_vty_init (void) install_element (BGP_NODE, &no_neighbor_set_peer_group_cmd); install_element (BGP_IPV4_NODE, &no_neighbor_set_peer_group_hidden_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_set_peer_group_hidden_cmd); - install_element (BGP_IPV4L_NODE, &no_neighbor_set_peer_group_hidden_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_set_peer_group_hidden_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_set_peer_group_hidden_cmd); install_element (BGP_IPV6L_NODE, &no_neighbor_set_peer_group_hidden_cmd); @@ -12180,8 +12167,7 @@ DEFUN (ip_lcommunity_list_standard, LCOMMUNITY_LIST_STR "Large Community list number (standard)\n" "Specify large community to reject\n" - "Specify large community to accept\n" - LCOMMUNITY_VAL_STR) + "Specify large community to accept\n") { return lcommunity_list_set_vty (vty, argc, argv, LARGE_COMMUNITY_LIST_STANDARD, 0); } |
