summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7b909c4)
raw | patch | inline | side by side (parent: 7b909c4)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 9 Aug 2007 10:42:30 +0000 (10:42 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 9 Aug 2007 10:42:30 +0000 (10:42 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7026 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_dhcpPool.inc | patch | blob | history | |
plugins/admin/systems/class_dhcpSubnet.inc | patch | blob | history |
index 5386057a8152f46c50158a5bdfc3ada685625b4d..d1c016d58b3b3c385f84ae61fe06714bb6d252c3 100644 (file)
$message[]= _("Field 'Range' contains invalid IP addresses.");
}
- if(!is_ip_range($this->range_start,$this->range_stop)){
- $message[] = _("Field 'Range' contains invalid IP range.");
- }
+ if(!is_ip_range($this->range_start,$this->range_stop)){
+ $message[] = _("Field 'Range' contains invalid IP range.");
+ }
+
+ /* Check if range is in the network */
+ #TODO: look for preceeding subnet entries in $cache and check if the
+ # range is valid.
+ #if (!is_in_network($this->cn, $this->dhcpNetMask, $this->range_start) ||
+ # !is_in_network($this->cn, $this->dhcpNetMask, $this->range_stop)){
+ # $message[] = _("'Range' is not inside the configured network.");
+ #}
return $message;
}
diff --git a/plugins/admin/systems/class_dhcpSubnet.inc b/plugins/admin/systems/class_dhcpSubnet.inc
index 7f8855b9eb80a7862f93067261f8391e31bb38fd..2620a7be0b411084d43088f88daa081f3649a6ed 100644 (file)
}
}
- /* Check ip range */
+ /* Check ip range */
if(!is_ip_range($this->range_start,$this->range_stop)){
$message[] = _("Field 'Range' contains invalid IP range.");
}
+ /* Check if range is in the network */
+ if (!is_in_network($this->cn, $this->dhcpNetMask, $this->range_start) ||
+ !is_in_network($this->cn, $this->dhcpNetMask, $this->range_stop)){
+ $message[] = _("'Range' is not inside the configured network.");
+ }
+
return $message;
}