From: Philippe Guibert Date: Thu, 25 Feb 2021 12:54:31 +0000 (+0100) Subject: bgpd: accept (ext)community list sequence number set to 0 X-Git-Tag: base_8.0~328^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F8150%2Fhead;p=mirror%2Ffrr.git bgpd: accept (ext)community list sequence number set to 0 now that sequence number is configurable, there is no problem in permitting to configure seq 0 sequence number. Signed-off-by: Philippe Guibert --- diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 9e8065691e..6a76237410 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -19060,7 +19060,7 @@ static void community_list_perror(struct vty *vty, int ret) /*community-list standard */ DEFUN (community_list_standard, bgp_community_list_standard_cmd, - "bgp community-list <(1-99)|standard WORD> [seq (1-4294967295)] AA:NN...", + "bgp community-list <(1-99)|standard WORD> [seq (0-4294967295)] AA:NN...", BGP_STR COMMUNITY_LIST_STR "Community list number (standard)\n" @@ -19078,7 +19078,7 @@ DEFUN (community_list_standard, int style = COMMUNITY_LIST_STANDARD; int idx = 0; - argv_find(argv, argc, "(1-4294967295)", &idx); + argv_find(argv, argc, "(0-4294967295)", &idx); if (idx) seq = argv[idx]->arg; @@ -19107,7 +19107,7 @@ DEFUN (community_list_standard, DEFUN (no_community_list_standard_all, no_bgp_community_list_standard_all_cmd, - "no bgp community-list <(1-99)|standard WORD> [seq (1-4294967295)] AA:NN...", + "no bgp community-list <(1-99)|standard WORD> [seq (0-4294967295)] AA:NN...", NO_STR BGP_STR COMMUNITY_LIST_STR @@ -19127,7 +19127,7 @@ DEFUN (no_community_list_standard_all, char *seq = NULL; int idx = 0; - argv_find(argv, argc, "(1-4294967295)", &idx); + argv_find(argv, argc, "(0-4294967295)", &idx); if (idx) seq = argv[idx]->arg; @@ -19173,7 +19173,7 @@ ALIAS(no_community_list_standard_all, no_bgp_community_list_standard_all_list_cm /*community-list expanded */ DEFUN (community_list_expanded_all, bgp_community_list_expanded_all_cmd, - "bgp community-list <(100-500)|expanded WORD> [seq (1-4294967295)] AA:NN...", + "bgp community-list <(100-500)|expanded WORD> [seq (0-4294967295)] AA:NN...", BGP_STR COMMUNITY_LIST_STR "Community list number (expanded)\n" @@ -19191,7 +19191,7 @@ DEFUN (community_list_expanded_all, int style = COMMUNITY_LIST_EXPANDED; int idx = 0; - argv_find(argv, argc, "(1-4294967295)", &idx); + argv_find(argv, argc, "(0-4294967295)", &idx); if (idx) seq = argv[idx]->arg; @@ -19221,7 +19221,7 @@ DEFUN (community_list_expanded_all, DEFUN (no_community_list_expanded_all, no_bgp_community_list_expanded_all_cmd, - "no bgp community-list <(100-500)|expanded WORD> [seq (1-4294967295)] AA:NN...", + "no bgp community-list <(100-500)|expanded WORD> [seq (0-4294967295)] AA:NN...", NO_STR BGP_STR COMMUNITY_LIST_STR @@ -19241,7 +19241,7 @@ DEFUN (no_community_list_expanded_all, int style = COMMUNITY_LIST_EXPANDED; int idx = 0; - argv_find(argv, argc, "(1-4294967295)", &idx); + argv_find(argv, argc, "(0-4294967295)", &idx); if (idx) seq = argv[idx]->arg; @@ -19394,7 +19394,7 @@ static int lcommunity_list_set_vty(struct vty *vty, int argc, char *cl_name; char *seq = NULL; - if (argv_find(argv, argc, "(1-4294967295)", &idx)) + if (argv_find(argv, argc, "(0-4294967295)", &idx)) seq = argv[idx]->arg; idx = 0; @@ -19443,7 +19443,7 @@ static int lcommunity_list_unset_vty(struct vty *vty, int argc, int idx = 0; char *seq = NULL; - if (argv_find(argv, argc, "(1-4294967295)", &idx)) + if (argv_find(argv, argc, "(0-4294967295)", &idx)) seq = argv[idx]->arg; idx = 0; @@ -19491,7 +19491,7 @@ static int lcommunity_list_unset_vty(struct vty *vty, int argc, DEFUN (lcommunity_list_standard, bgp_lcommunity_list_standard_cmd, - "bgp large-community-list (1-99) [seq (1-4294967295)] AA:BB:CC...", + "bgp large-community-list (1-99) [seq (0-4294967295)] AA:BB:CC...", BGP_STR LCOMMUNITY_LIST_STR "Large Community list number (standard)\n" @@ -19507,7 +19507,7 @@ DEFUN (lcommunity_list_standard, DEFUN (lcommunity_list_expanded, bgp_lcommunity_list_expanded_cmd, - "bgp large-community-list (100-500) [seq (1-4294967295)] LINE...", + "bgp large-community-list (100-500) [seq (0-4294967295)] LINE...", BGP_STR LCOMMUNITY_LIST_STR "Large Community list number (expanded)\n" @@ -19523,7 +19523,7 @@ DEFUN (lcommunity_list_expanded, DEFUN (lcommunity_list_name_standard, bgp_lcommunity_list_name_standard_cmd, - "bgp large-community-list standard WORD [seq (1-4294967295)] AA:BB:CC...", + "bgp large-community-list standard WORD [seq (0-4294967295)] AA:BB:CC...", BGP_STR LCOMMUNITY_LIST_STR "Specify standard large-community-list\n" @@ -19540,7 +19540,7 @@ DEFUN (lcommunity_list_name_standard, DEFUN (lcommunity_list_name_expanded, bgp_lcommunity_list_name_expanded_cmd, - "bgp large-community-list expanded WORD [seq (1-4294967295)] LINE...", + "bgp large-community-list expanded WORD [seq (0-4294967295)] LINE...", BGP_STR LCOMMUNITY_LIST_STR "Specify expanded large-community-list\n" @@ -19597,7 +19597,7 @@ DEFUN (no_lcommunity_list_name_expanded_all, DEFUN (no_lcommunity_list_standard, no_bgp_lcommunity_list_standard_cmd, - "no bgp large-community-list (1-99) [seq (1-4294967295)] AA:AA:NN...", + "no bgp large-community-list (1-99) [seq (0-4294967295)] AA:AA:NN...", NO_STR BGP_STR LCOMMUNITY_LIST_STR @@ -19614,7 +19614,7 @@ DEFUN (no_lcommunity_list_standard, DEFUN (no_lcommunity_list_expanded, no_bgp_lcommunity_list_expanded_cmd, - "no bgp large-community-list (100-500) [seq (1-4294967295)] LINE...", + "no bgp large-community-list (100-500) [seq (0-4294967295)] LINE...", NO_STR BGP_STR LCOMMUNITY_LIST_STR @@ -19631,7 +19631,7 @@ DEFUN (no_lcommunity_list_expanded, DEFUN (no_lcommunity_list_name_standard, no_bgp_lcommunity_list_name_standard_cmd, - "no bgp large-community-list standard WORD [seq (1-4294967295)] AA:AA:NN...", + "no bgp large-community-list standard WORD [seq (0-4294967295)] AA:AA:NN...", NO_STR BGP_STR LCOMMUNITY_LIST_STR @@ -19649,7 +19649,7 @@ DEFUN (no_lcommunity_list_name_standard, DEFUN (no_lcommunity_list_name_expanded, no_bgp_lcommunity_list_name_expanded_cmd, - "no bgp large-community-list expanded WORD [seq (1-4294967295)] LINE...", + "no bgp large-community-list expanded WORD [seq (0-4294967295)] LINE...", NO_STR BGP_STR LCOMMUNITY_LIST_STR @@ -19751,7 +19751,7 @@ DEFUN (show_lcommunity_list_arg, DEFUN (extcommunity_list_standard, bgp_extcommunity_list_standard_cmd, - "bgp extcommunity-list <(1-99)|standard WORD> [seq (1-4294967295)] AA:NN...", + "bgp extcommunity-list <(1-99)|standard WORD> [seq (0-4294967295)] AA:NN...", BGP_STR EXTCOMMUNITY_LIST_STR "Extended Community list number (standard)\n" @@ -19774,7 +19774,7 @@ DEFUN (extcommunity_list_standard, argv_find(argv, argc, "WORD", &idx); cl_number_or_name = argv[idx]->arg; - if (argv_find(argv, argc, "(1-4294967295)", &idx)) + if (argv_find(argv, argc, "(0-4294967295)", &idx)) seq = argv[idx]->arg; direct = argv_find(argv, argc, "permit", &idx) ? COMMUNITY_PERMIT @@ -19797,7 +19797,7 @@ DEFUN (extcommunity_list_standard, DEFUN (extcommunity_list_name_expanded, bgp_extcommunity_list_name_expanded_cmd, - "bgp extcommunity-list <(100-500)|expanded WORD> [seq (1-4294967295)] LINE...", + "bgp extcommunity-list <(100-500)|expanded WORD> [seq (0-4294967295)] LINE...", BGP_STR EXTCOMMUNITY_LIST_STR "Extended Community list number (expanded)\n" @@ -19819,7 +19819,7 @@ DEFUN (extcommunity_list_name_expanded, argv_find(argv, argc, "WORD", &idx); cl_number_or_name = argv[idx]->arg; - if (argv_find(argv, argc, "(1-4294967295)", &idx)) + if (argv_find(argv, argc, "(0-4294967295)", &idx)) seq = argv[idx]->arg; direct = argv_find(argv, argc, "permit", &idx) ? COMMUNITY_PERMIT @@ -19842,7 +19842,7 @@ DEFUN (extcommunity_list_name_expanded, DEFUN (no_extcommunity_list_standard_all, no_bgp_extcommunity_list_standard_all_cmd, - "no bgp extcommunity-list <(1-99)|standard WORD> [seq (1-4294967295)] AA:NN...", + "no bgp extcommunity-list <(1-99)|standard WORD> [seq (0-4294967295)] AA:NN...", NO_STR BGP_STR EXTCOMMUNITY_LIST_STR @@ -19862,7 +19862,7 @@ DEFUN (no_extcommunity_list_standard_all, char *seq = NULL; int idx = 0; - if (argv_find(argv, argc, "(1-4294967295)", &idx)) + if (argv_find(argv, argc, "(0-4294967295)", &idx)) seq = argv[idx]->arg; idx = 0; @@ -19906,7 +19906,7 @@ ALIAS(no_extcommunity_list_standard_all, DEFUN (no_extcommunity_list_expanded_all, no_bgp_extcommunity_list_expanded_all_cmd, - "no bgp extcommunity-list <(100-500)|expanded WORD> [seq (1-4294967295)] LINE...", + "no bgp extcommunity-list <(100-500)|expanded WORD> [seq (0-4294967295)] LINE...", NO_STR BGP_STR EXTCOMMUNITY_LIST_STR @@ -19926,7 +19926,7 @@ DEFUN (no_extcommunity_list_expanded_all, char *seq = NULL; int idx = 0; - if (argv_find(argv, argc, "(1-4294967295)", &idx)) + if (argv_find(argv, argc, "(0-4294967295)", &idx)) seq = argv[idx]->arg; idx = 0;