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 <philippe.guibert@6wind.com>
This commit is contained in:
Philippe Guibert 2021-02-25 13:54:31 +01:00
parent 0ff7911386
commit a08032feae

View File

@ -19060,7 +19060,7 @@ static void community_list_perror(struct vty *vty, int ret)
/*community-list standard */ /*community-list standard */
DEFUN (community_list_standard, DEFUN (community_list_standard,
bgp_community_list_standard_cmd, bgp_community_list_standard_cmd,
"bgp community-list <(1-99)|standard WORD> [seq (1-4294967295)] <deny|permit> AA:NN...", "bgp community-list <(1-99)|standard WORD> [seq (0-4294967295)] <deny|permit> AA:NN...",
BGP_STR BGP_STR
COMMUNITY_LIST_STR COMMUNITY_LIST_STR
"Community list number (standard)\n" "Community list number (standard)\n"
@ -19078,7 +19078,7 @@ DEFUN (community_list_standard,
int style = COMMUNITY_LIST_STANDARD; int style = COMMUNITY_LIST_STANDARD;
int idx = 0; int idx = 0;
argv_find(argv, argc, "(1-4294967295)", &idx); argv_find(argv, argc, "(0-4294967295)", &idx);
if (idx) if (idx)
seq = argv[idx]->arg; seq = argv[idx]->arg;
@ -19107,7 +19107,7 @@ DEFUN (community_list_standard,
DEFUN (no_community_list_standard_all, DEFUN (no_community_list_standard_all,
no_bgp_community_list_standard_all_cmd, no_bgp_community_list_standard_all_cmd,
"no bgp community-list <(1-99)|standard WORD> [seq (1-4294967295)] <deny|permit> AA:NN...", "no bgp community-list <(1-99)|standard WORD> [seq (0-4294967295)] <deny|permit> AA:NN...",
NO_STR NO_STR
BGP_STR BGP_STR
COMMUNITY_LIST_STR COMMUNITY_LIST_STR
@ -19127,7 +19127,7 @@ DEFUN (no_community_list_standard_all,
char *seq = NULL; char *seq = NULL;
int idx = 0; int idx = 0;
argv_find(argv, argc, "(1-4294967295)", &idx); argv_find(argv, argc, "(0-4294967295)", &idx);
if (idx) if (idx)
seq = argv[idx]->arg; 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 */ /*community-list expanded */
DEFUN (community_list_expanded_all, DEFUN (community_list_expanded_all,
bgp_community_list_expanded_all_cmd, bgp_community_list_expanded_all_cmd,
"bgp community-list <(100-500)|expanded WORD> [seq (1-4294967295)] <deny|permit> AA:NN...", "bgp community-list <(100-500)|expanded WORD> [seq (0-4294967295)] <deny|permit> AA:NN...",
BGP_STR BGP_STR
COMMUNITY_LIST_STR COMMUNITY_LIST_STR
"Community list number (expanded)\n" "Community list number (expanded)\n"
@ -19191,7 +19191,7 @@ DEFUN (community_list_expanded_all,
int style = COMMUNITY_LIST_EXPANDED; int style = COMMUNITY_LIST_EXPANDED;
int idx = 0; int idx = 0;
argv_find(argv, argc, "(1-4294967295)", &idx); argv_find(argv, argc, "(0-4294967295)", &idx);
if (idx) if (idx)
seq = argv[idx]->arg; seq = argv[idx]->arg;
@ -19221,7 +19221,7 @@ DEFUN (community_list_expanded_all,
DEFUN (no_community_list_expanded_all, DEFUN (no_community_list_expanded_all,
no_bgp_community_list_expanded_all_cmd, no_bgp_community_list_expanded_all_cmd,
"no bgp community-list <(100-500)|expanded WORD> [seq (1-4294967295)] <deny|permit> AA:NN...", "no bgp community-list <(100-500)|expanded WORD> [seq (0-4294967295)] <deny|permit> AA:NN...",
NO_STR NO_STR
BGP_STR BGP_STR
COMMUNITY_LIST_STR COMMUNITY_LIST_STR
@ -19241,7 +19241,7 @@ DEFUN (no_community_list_expanded_all,
int style = COMMUNITY_LIST_EXPANDED; int style = COMMUNITY_LIST_EXPANDED;
int idx = 0; int idx = 0;
argv_find(argv, argc, "(1-4294967295)", &idx); argv_find(argv, argc, "(0-4294967295)", &idx);
if (idx) if (idx)
seq = argv[idx]->arg; seq = argv[idx]->arg;
@ -19394,7 +19394,7 @@ static int lcommunity_list_set_vty(struct vty *vty, int argc,
char *cl_name; char *cl_name;
char *seq = NULL; char *seq = NULL;
if (argv_find(argv, argc, "(1-4294967295)", &idx)) if (argv_find(argv, argc, "(0-4294967295)", &idx))
seq = argv[idx]->arg; seq = argv[idx]->arg;
idx = 0; idx = 0;
@ -19443,7 +19443,7 @@ static int lcommunity_list_unset_vty(struct vty *vty, int argc,
int idx = 0; int idx = 0;
char *seq = NULL; char *seq = NULL;
if (argv_find(argv, argc, "(1-4294967295)", &idx)) if (argv_find(argv, argc, "(0-4294967295)", &idx))
seq = argv[idx]->arg; seq = argv[idx]->arg;
idx = 0; idx = 0;
@ -19491,7 +19491,7 @@ static int lcommunity_list_unset_vty(struct vty *vty, int argc,
DEFUN (lcommunity_list_standard, DEFUN (lcommunity_list_standard,
bgp_lcommunity_list_standard_cmd, bgp_lcommunity_list_standard_cmd,
"bgp large-community-list (1-99) [seq (1-4294967295)] <deny|permit> AA:BB:CC...", "bgp large-community-list (1-99) [seq (0-4294967295)] <deny|permit> AA:BB:CC...",
BGP_STR BGP_STR
LCOMMUNITY_LIST_STR LCOMMUNITY_LIST_STR
"Large Community list number (standard)\n" "Large Community list number (standard)\n"
@ -19507,7 +19507,7 @@ DEFUN (lcommunity_list_standard,
DEFUN (lcommunity_list_expanded, DEFUN (lcommunity_list_expanded,
bgp_lcommunity_list_expanded_cmd, bgp_lcommunity_list_expanded_cmd,
"bgp large-community-list (100-500) [seq (1-4294967295)] <deny|permit> LINE...", "bgp large-community-list (100-500) [seq (0-4294967295)] <deny|permit> LINE...",
BGP_STR BGP_STR
LCOMMUNITY_LIST_STR LCOMMUNITY_LIST_STR
"Large Community list number (expanded)\n" "Large Community list number (expanded)\n"
@ -19523,7 +19523,7 @@ DEFUN (lcommunity_list_expanded,
DEFUN (lcommunity_list_name_standard, DEFUN (lcommunity_list_name_standard,
bgp_lcommunity_list_name_standard_cmd, bgp_lcommunity_list_name_standard_cmd,
"bgp large-community-list standard WORD [seq (1-4294967295)] <deny|permit> AA:BB:CC...", "bgp large-community-list standard WORD [seq (0-4294967295)] <deny|permit> AA:BB:CC...",
BGP_STR BGP_STR
LCOMMUNITY_LIST_STR LCOMMUNITY_LIST_STR
"Specify standard large-community-list\n" "Specify standard large-community-list\n"
@ -19540,7 +19540,7 @@ DEFUN (lcommunity_list_name_standard,
DEFUN (lcommunity_list_name_expanded, DEFUN (lcommunity_list_name_expanded,
bgp_lcommunity_list_name_expanded_cmd, bgp_lcommunity_list_name_expanded_cmd,
"bgp large-community-list expanded WORD [seq (1-4294967295)] <deny|permit> LINE...", "bgp large-community-list expanded WORD [seq (0-4294967295)] <deny|permit> LINE...",
BGP_STR BGP_STR
LCOMMUNITY_LIST_STR LCOMMUNITY_LIST_STR
"Specify expanded large-community-list\n" "Specify expanded large-community-list\n"
@ -19597,7 +19597,7 @@ DEFUN (no_lcommunity_list_name_expanded_all,
DEFUN (no_lcommunity_list_standard, DEFUN (no_lcommunity_list_standard,
no_bgp_lcommunity_list_standard_cmd, no_bgp_lcommunity_list_standard_cmd,
"no bgp large-community-list (1-99) [seq (1-4294967295)] <deny|permit> AA:AA:NN...", "no bgp large-community-list (1-99) [seq (0-4294967295)] <deny|permit> AA:AA:NN...",
NO_STR NO_STR
BGP_STR BGP_STR
LCOMMUNITY_LIST_STR LCOMMUNITY_LIST_STR
@ -19614,7 +19614,7 @@ DEFUN (no_lcommunity_list_standard,
DEFUN (no_lcommunity_list_expanded, DEFUN (no_lcommunity_list_expanded,
no_bgp_lcommunity_list_expanded_cmd, no_bgp_lcommunity_list_expanded_cmd,
"no bgp large-community-list (100-500) [seq (1-4294967295)] <deny|permit> LINE...", "no bgp large-community-list (100-500) [seq (0-4294967295)] <deny|permit> LINE...",
NO_STR NO_STR
BGP_STR BGP_STR
LCOMMUNITY_LIST_STR LCOMMUNITY_LIST_STR
@ -19631,7 +19631,7 @@ DEFUN (no_lcommunity_list_expanded,
DEFUN (no_lcommunity_list_name_standard, DEFUN (no_lcommunity_list_name_standard,
no_bgp_lcommunity_list_name_standard_cmd, no_bgp_lcommunity_list_name_standard_cmd,
"no bgp large-community-list standard WORD [seq (1-4294967295)] <deny|permit> AA:AA:NN...", "no bgp large-community-list standard WORD [seq (0-4294967295)] <deny|permit> AA:AA:NN...",
NO_STR NO_STR
BGP_STR BGP_STR
LCOMMUNITY_LIST_STR LCOMMUNITY_LIST_STR
@ -19649,7 +19649,7 @@ DEFUN (no_lcommunity_list_name_standard,
DEFUN (no_lcommunity_list_name_expanded, DEFUN (no_lcommunity_list_name_expanded,
no_bgp_lcommunity_list_name_expanded_cmd, no_bgp_lcommunity_list_name_expanded_cmd,
"no bgp large-community-list expanded WORD [seq (1-4294967295)] <deny|permit> LINE...", "no bgp large-community-list expanded WORD [seq (0-4294967295)] <deny|permit> LINE...",
NO_STR NO_STR
BGP_STR BGP_STR
LCOMMUNITY_LIST_STR LCOMMUNITY_LIST_STR
@ -19751,7 +19751,7 @@ DEFUN (show_lcommunity_list_arg,
DEFUN (extcommunity_list_standard, DEFUN (extcommunity_list_standard,
bgp_extcommunity_list_standard_cmd, bgp_extcommunity_list_standard_cmd,
"bgp extcommunity-list <(1-99)|standard WORD> [seq (1-4294967295)] <deny|permit> AA:NN...", "bgp extcommunity-list <(1-99)|standard WORD> [seq (0-4294967295)] <deny|permit> AA:NN...",
BGP_STR BGP_STR
EXTCOMMUNITY_LIST_STR EXTCOMMUNITY_LIST_STR
"Extended Community list number (standard)\n" "Extended Community list number (standard)\n"
@ -19774,7 +19774,7 @@ DEFUN (extcommunity_list_standard,
argv_find(argv, argc, "WORD", &idx); argv_find(argv, argc, "WORD", &idx);
cl_number_or_name = argv[idx]->arg; 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; seq = argv[idx]->arg;
direct = argv_find(argv, argc, "permit", &idx) ? COMMUNITY_PERMIT direct = argv_find(argv, argc, "permit", &idx) ? COMMUNITY_PERMIT
@ -19797,7 +19797,7 @@ DEFUN (extcommunity_list_standard,
DEFUN (extcommunity_list_name_expanded, DEFUN (extcommunity_list_name_expanded,
bgp_extcommunity_list_name_expanded_cmd, bgp_extcommunity_list_name_expanded_cmd,
"bgp extcommunity-list <(100-500)|expanded WORD> [seq (1-4294967295)] <deny|permit> LINE...", "bgp extcommunity-list <(100-500)|expanded WORD> [seq (0-4294967295)] <deny|permit> LINE...",
BGP_STR BGP_STR
EXTCOMMUNITY_LIST_STR EXTCOMMUNITY_LIST_STR
"Extended Community list number (expanded)\n" "Extended Community list number (expanded)\n"
@ -19819,7 +19819,7 @@ DEFUN (extcommunity_list_name_expanded,
argv_find(argv, argc, "WORD", &idx); argv_find(argv, argc, "WORD", &idx);
cl_number_or_name = argv[idx]->arg; 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; seq = argv[idx]->arg;
direct = argv_find(argv, argc, "permit", &idx) ? COMMUNITY_PERMIT direct = argv_find(argv, argc, "permit", &idx) ? COMMUNITY_PERMIT
@ -19842,7 +19842,7 @@ DEFUN (extcommunity_list_name_expanded,
DEFUN (no_extcommunity_list_standard_all, DEFUN (no_extcommunity_list_standard_all,
no_bgp_extcommunity_list_standard_all_cmd, no_bgp_extcommunity_list_standard_all_cmd,
"no bgp extcommunity-list <(1-99)|standard WORD> [seq (1-4294967295)] <deny|permit> AA:NN...", "no bgp extcommunity-list <(1-99)|standard WORD> [seq (0-4294967295)] <deny|permit> AA:NN...",
NO_STR NO_STR
BGP_STR BGP_STR
EXTCOMMUNITY_LIST_STR EXTCOMMUNITY_LIST_STR
@ -19862,7 +19862,7 @@ DEFUN (no_extcommunity_list_standard_all,
char *seq = NULL; char *seq = NULL;
int idx = 0; int idx = 0;
if (argv_find(argv, argc, "(1-4294967295)", &idx)) if (argv_find(argv, argc, "(0-4294967295)", &idx))
seq = argv[idx]->arg; seq = argv[idx]->arg;
idx = 0; idx = 0;
@ -19906,7 +19906,7 @@ ALIAS(no_extcommunity_list_standard_all,
DEFUN (no_extcommunity_list_expanded_all, DEFUN (no_extcommunity_list_expanded_all,
no_bgp_extcommunity_list_expanded_all_cmd, no_bgp_extcommunity_list_expanded_all_cmd,
"no bgp extcommunity-list <(100-500)|expanded WORD> [seq (1-4294967295)] <deny|permit> LINE...", "no bgp extcommunity-list <(100-500)|expanded WORD> [seq (0-4294967295)] <deny|permit> LINE...",
NO_STR NO_STR
BGP_STR BGP_STR
EXTCOMMUNITY_LIST_STR EXTCOMMUNITY_LIST_STR
@ -19926,7 +19926,7 @@ DEFUN (no_extcommunity_list_expanded_all,
char *seq = NULL; char *seq = NULL;
int idx = 0; int idx = 0;
if (argv_find(argv, argc, "(1-4294967295)", &idx)) if (argv_find(argv, argc, "(0-4294967295)", &idx))
seq = argv[idx]->arg; seq = argv[idx]->arg;
idx = 0; idx = 0;