]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: --enable-multipath=256 setting is ignored
authorDaniel Walton <dwalton@cumulusnetworks.com>
Tue, 11 Jul 2017 18:41:08 +0000 (18:41 +0000)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Tue, 11 Jul 2017 18:41:08 +0000 (18:41 +0000)
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Restoring some code that was unintentionally removed when we were
migrating to Quentin's parser.

bgpd/bgp_vty.c
lib/command.h

index 710aa926ad411e2ecebc3b982a61fa7a88751889..3c649fd6573d77c96c0a0481fc829924e2294cb4 100644 (file)
@@ -1487,7 +1487,7 @@ DEFUN (no_bgp_coalesce_time,
 /* Maximum-paths configuration */
 DEFUN (bgp_maxpaths,
        bgp_maxpaths_cmd,
-       "maximum-paths (1-255)",
+       "maximum-paths " CMD_RANGE_STR(1, MULTIPATH_NUM),
        "Forward packets over multiple paths\n"
        "Number of paths\n")
 {
@@ -1497,13 +1497,13 @@ DEFUN (bgp_maxpaths,
 
 ALIAS_HIDDEN (bgp_maxpaths,
               bgp_maxpaths_hidden_cmd,
-              "maximum-paths (1-255)",
+              "maximum-paths " CMD_RANGE_STR(1, MULTIPATH_NUM),
               "Forward packets over multiple paths\n"
               "Number of paths\n")
 
 DEFUN (bgp_maxpaths_ibgp,
        bgp_maxpaths_ibgp_cmd,
-       "maximum-paths ibgp (1-255)",
+       "maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM),
        "Forward packets over multiple paths\n"
        "iBGP-multipath\n"
        "Number of paths\n")
@@ -1514,14 +1514,14 @@ DEFUN (bgp_maxpaths_ibgp,
 
 ALIAS_HIDDEN (bgp_maxpaths_ibgp,
               bgp_maxpaths_ibgp_hidden_cmd,
-              "maximum-paths ibgp (1-255)",
+              "maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM),
               "Forward packets over multiple paths\n"
               "iBGP-multipath\n"
               "Number of paths\n")
 
 DEFUN (bgp_maxpaths_ibgp_cluster,
        bgp_maxpaths_ibgp_cluster_cmd,
-       "maximum-paths ibgp (1-255) equal-cluster-length",
+       "maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM) " equal-cluster-length",
        "Forward packets over multiple paths\n"
        "iBGP-multipath\n"
        "Number of paths\n"
@@ -1534,7 +1534,7 @@ DEFUN (bgp_maxpaths_ibgp_cluster,
 
 ALIAS_HIDDEN (bgp_maxpaths_ibgp_cluster,
               bgp_maxpaths_ibgp_cluster_hidden_cmd,
-              "maximum-paths ibgp (1-255) equal-cluster-length",
+              "maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM) " equal-cluster-length",
               "Forward packets over multiple paths\n"
               "iBGP-multipath\n"
               "Number of paths\n"
@@ -1542,7 +1542,7 @@ ALIAS_HIDDEN (bgp_maxpaths_ibgp_cluster,
 
 DEFUN (no_bgp_maxpaths,
        no_bgp_maxpaths_cmd,
-       "no maximum-paths [(1-255)]",
+       "no maximum-paths [" CMD_RANGE_STR(1, MULTIPATH_NUM) "]",
        NO_STR
        "Forward packets over multiple paths\n"
        "Number of paths\n")
@@ -1552,14 +1552,14 @@ DEFUN (no_bgp_maxpaths,
 
 ALIAS_HIDDEN (no_bgp_maxpaths,
               no_bgp_maxpaths_hidden_cmd,
-              "no maximum-paths [(1-255)]",
+              "no maximum-paths [" CMD_RANGE_STR(1, MULTIPATH_NUM) "]",
               NO_STR
               "Forward packets over multiple paths\n"
               "Number of paths\n")
 
 DEFUN (no_bgp_maxpaths_ibgp,
        no_bgp_maxpaths_ibgp_cmd,
-       "no maximum-paths ibgp [(1-255) [equal-cluster-length]]",
+       "no maximum-paths ibgp [" CMD_RANGE_STR(1, MULTIPATH_NUM) " [equal-cluster-length]]",
        NO_STR
        "Forward packets over multiple paths\n"
        "iBGP-multipath\n"
@@ -1571,7 +1571,7 @@ DEFUN (no_bgp_maxpaths_ibgp,
 
 ALIAS_HIDDEN (no_bgp_maxpaths_ibgp,
               no_bgp_maxpaths_ibgp_hidden_cmd,
-              "no maximum-paths ibgp [(1-255) [equal-cluster-length]]",
+              "no maximum-paths ibgp [" CMD_RANGE_STR(1, MULTIPATH_NUM) " [equal-cluster-length]]",
               NO_STR
               "Forward packets over multiple paths\n"
               "iBGP-multipath\n"
index 927c04006c5d6bb36029046e22d90c4e4fb88f75..9768380c74bf66531d0cee20902a668d154dfc4d 100644 (file)
@@ -293,6 +293,7 @@ struct cmd_node
  */
 #define CMD_CREATE_STR(s)  CMD_CREATE_STR_HELPER(s)
 #define CMD_CREATE_STR_HELPER(s) #s
+#define CMD_RANGE_STR(a,s) "(" CMD_CREATE_STR(a) "-" CMD_CREATE_STR(s) ")"
 
 /* Common descriptions. */
 #define SHOW_STR "Show running system information\n"