+ if ((this.getIPMaskLen() == 0) || (this.getIPMaskLen() == 32)) {
+ return new Status(StatusCode.BADREQUEST, String.format("Invalid Subnet configuration: Invalid mask: /%s",
+ this.getIPMaskLen()));
+ }
+
+ //checks that address doesn't start with 0 or 255
+ String address = subnet.split("/")[0];
+ if (address.startsWith("0.") || address.startsWith("255.")) {
+ return new Status(StatusCode.BADREQUEST, String.format("Invalid Subnet configuration: Invalid address: %s", address));
+ }
+