Skip to content

Commit 75da050

Browse files
committed
CLOUDSTACK-8329: CloudStack accepts IP ends with dot
1 parent 5a860fe commit 75da050

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎utils/src/com/cloud/utils/net/NetUtils.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,10 @@ public static boolean validIpRange(String startIP, String endIP) {
515515
}
516516

517517
public static boolean isValidIp(final String ip) {
518+
if (ip.endsWith(".")) {
519+
return false;
520+
}
521+
518522
final String[] ipAsList = ip.split("\\.");
519523

520524
// The IP address must have four octets

0 commit comments

Comments
 (0)