diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-12-09 08:24:47 -0500 |
---|---|---|
committer | Paul Jakma <paul.jakma@hpe.com> | 2016-02-26 14:11:47 +0000 |
commit | ecc1a136e10e0717761b6f436d299938a05a1309 (patch) | |
tree | b2158970126f59d00e76dba8029441ac7738608f | |
parent | b2a2fd788f34a4f5d1bbd92a283e47704f05ae8f (diff) | |
download | quagga-ecc1a136e10e0717761b6f436d299938a05a1309.tar.bz2 quagga-ecc1a136e10e0717761b6f436d299938a05a1309.tar.xz |
bgpd: Modify maxpaths cli's to use MULTIPATH_NUM for range
Modify the various maxpath commands to use MULTIPATH_NUM
as the upper limit of allowed max paths in BGP. There
is no point in allowing a number of maximum paths greater
than what Quagga is compiled for.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Tested-by: NetDEF CI System <cisystem@netdef.org>
-rw-r--r-- | bgpd/bgp_vty.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 18a22264..6db3dcb1 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -715,7 +715,7 @@ DEFUN (no_bgp_confederation_peers, /* 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") { @@ -737,17 +737,12 @@ DEFUN (bgp_maxpaths, return CMD_WARNING; } - if (maxpaths > MULTIPATH_NUM) - vty_out (vty, - "%% Warning: maximum-paths set to %d is greater than %d that zebra is compiled to support%s", - maxpaths, MULTIPATH_NUM, VTY_NEWLINE); - return CMD_SUCCESS; } 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") @@ -770,11 +765,6 @@ DEFUN (bgp_maxpaths_ibgp, return CMD_WARNING; } - if (maxpaths > MULTIPATH_NUM) - vty_out (vty, - "%% Warning: maximum-paths set to %d is greater than %d that zebra is compiled to support%s", - maxpaths, MULTIPATH_NUM, VTY_NEWLINE); - return CMD_SUCCESS; } @@ -805,7 +795,7 @@ DEFUN (no_bgp_maxpaths, ALIAS (no_bgp_maxpaths, no_bgp_maxpaths_arg_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") @@ -838,7 +828,7 @@ DEFUN (no_bgp_maxpaths_ibgp, ALIAS (no_bgp_maxpaths_ibgp, no_bgp_maxpaths_ibgp_arg_cmd, - "no maximum-paths ibgp <1-255>", + "no maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM), NO_STR "Forward packets over multiple paths\n" "iBGP-multipath\n" |