]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: accept (ext)community list sequence number set to 0 8150/head
authorPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 25 Feb 2021 12:54:31 +0000 (13:54 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 1 Mar 2021 10:21:13 +0000 (11:21 +0100)
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>
bgpd/bgp_vty.c

index 9e8065691e75030ad47053aa2cca5bea5d6c2b37..6a7623741010d0a0591c8fd462994f2e03bb4984 100644 (file)
@@ -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)] <deny|permit> AA:NN...",
+       "bgp community-list <(1-99)|standard WORD> [seq (0-4294967295)] <deny|permit> 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)] <deny|permit> AA:NN...",
+       "no bgp community-list <(1-99)|standard WORD> [seq (0-4294967295)] <deny|permit> 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)] <deny|permit> AA:NN...",
+       "bgp community-list <(100-500)|expanded WORD> [seq (0-4294967295)] <deny|permit> 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)] <deny|permit> AA:NN...",
+       "no bgp community-list <(100-500)|expanded WORD> [seq (0-4294967295)] <deny|permit> 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)] <deny|permit> AA:BB:CC...",
+       "bgp large-community-list (1-99) [seq (0-4294967295)] <deny|permit> 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)] <deny|permit> LINE...",
+       "bgp large-community-list (100-500) [seq (0-4294967295)] <deny|permit> 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)] <deny|permit> AA:BB:CC...",
+       "bgp large-community-list standard WORD [seq (0-4294967295)] <deny|permit> 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)] <deny|permit> LINE...",
+       "bgp large-community-list expanded WORD [seq (0-4294967295)] <deny|permit> 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)] <deny|permit> AA:AA:NN...",
+       "no bgp large-community-list (1-99) [seq (0-4294967295)] <deny|permit> 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)] <deny|permit> LINE...",
+       "no bgp large-community-list (100-500) [seq (0-4294967295)] <deny|permit> 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)] <deny|permit> AA:AA:NN...",
+       "no bgp large-community-list standard WORD [seq (0-4294967295)] <deny|permit> 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)] <deny|permit> LINE...",
+       "no bgp large-community-list expanded WORD [seq (0-4294967295)] <deny|permit> 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)] <deny|permit> AA:NN...",
+       "bgp extcommunity-list <(1-99)|standard WORD> [seq (0-4294967295)] <deny|permit> 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)] <deny|permit> LINE...",
+       "bgp extcommunity-list <(100-500)|expanded WORD> [seq (0-4294967295)] <deny|permit> 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)] <deny|permit> AA:NN...",
+       "no bgp extcommunity-list <(1-99)|standard WORD> [seq (0-4294967295)] <deny|permit> 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)] <deny|permit> LINE...",
+       "no bgp extcommunity-list <(100-500)|expanded WORD> [seq (0-4294967295)] <deny|permit> 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;