From ecc1a136e10e0717761b6f436d299938a05a1309 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 9 Dec 2015 08:24:47 -0500 Subject: 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 Tested-by: NetDEF CI System --- bgpd/bgp_vty.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'bgpd') 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" -- cgit v1.2.3