From: Quentin Young Date: Sun, 6 Nov 2016 07:38:50 +0000 (+0000) Subject: bgpd: Fix `maximum-paths (1-255)` X-Git-Tag: frr-3.0-branchpoint~129^2~47 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=dff6764af2a8884d538219aae2d1bca9103e1341;p=matthieu%2Ffrr.git bgpd: Fix `maximum-paths (1-255)` Signed-off-by: Quentin Young --- diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 715c84aa03..f222161952 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -1007,7 +1007,7 @@ bgp_maxpaths_config_vty (struct vty *vty, int peer_type, const char *mpaths, u_int16_t options, int set) { struct bgp *bgp; - u_int16_t maxpaths = 0; + u_int16_t maxpaths = strtol(mpaths, NULL, 10); int ret; afi_t afi; safi_t safi; @@ -1017,12 +1017,7 @@ bgp_maxpaths_config_vty (struct vty *vty, int peer_type, const char *mpaths, safi = bgp_node_safi (vty); if (set) - { - VTY_GET_INTEGER_RANGE ("maximum-paths", maxpaths, mpaths, 1, - MULTIPATH_NUM); - ret = bgp_maximum_paths_set (bgp, afi, safi, peer_type, maxpaths, - options); - } + ret = bgp_maximum_paths_set (bgp, afi, safi, peer_type, maxpaths, options); else ret = bgp_maximum_paths_unset (bgp, afi, safi, peer_type);