Adding a check to ensure maxpath value for BGP multipath is in the range 1
to 64
Change-Id: I03786726053672d04b8ef552cb16cc45a9c4a840
Signed-off-by: Gowri R <gowri.r@ericsson.com>
af_afi afi = null;
af_safi safi = null;
+ int imaxpath = maxpath == null ? -1 : Integer.parseInt(maxpath);
if (addrFamily != null) {
if (!addrFamily.equals("lu")) {
safi = af_safi.SAFI_MPLS_VPN;
}
+ if (imaxpath < 1 && imaxpath > 64) {
+ session.getConsole().println("error: " + MAXPATH + " must be between 1 and 64");
+ return null;
+ }
+
if (multipathEnable != null) {
switch (multipathEnable) {