Code

Added checks for ip range to shcp pool and subnet
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 9 Aug 2007 09:44:01 +0000 (09:44 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 9 Aug 2007 09:44:01 +0000 (09:44 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7023 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_dhcpPool.inc
plugins/admin/systems/class_dhcpSubnet.inc

index 26e9c39b89cae1676383a04bb9accb1280ca27bd..5386057a8152f46c50158a5bdfc3ada685625b4d 100644 (file)
@@ -122,6 +122,10 @@ class dhcpPool extends dhcpPlugin
       $message[]= _("Field 'Range' contains invalid IP addresses.");
     }
 
+       if(!is_ip_range($this->range_start,$this->range_stop)){
+               $message[] = _("Field 'Range' contains invalid IP range.");
+       }
+
     return $message;
   }
 
index 49723962d57eeb6ac3696e406a8684826cb7db85..0e55c8e6f79bf9566727349eaf02d4c47fe8bb1e 100644 (file)
@@ -150,6 +150,11 @@ class dhcpSubnet extends dhcpPlugin
       }
     }
 
+       /* Check ip range */
+    if(!is_ip_range($this->range_start,$this->range_stop)){
+        $message[] = _("Field 'Range' contains invalid IP range.");
+    }
+
     return $message;
   }