From 4f2f4a24c00302b84a375287071259b966b89a3a Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 9 Aug 2007 09:44:01 +0000 Subject: [PATCH] Added checks for ip range to shcp pool and subnet git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7023 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_dhcpPool.inc | 4 ++++ plugins/admin/systems/class_dhcpSubnet.inc | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/plugins/admin/systems/class_dhcpPool.inc b/plugins/admin/systems/class_dhcpPool.inc index 26e9c39b8..5386057a8 100644 --- a/plugins/admin/systems/class_dhcpPool.inc +++ b/plugins/admin/systems/class_dhcpPool.inc @@ -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; } diff --git a/plugins/admin/systems/class_dhcpSubnet.inc b/plugins/admin/systems/class_dhcpSubnet.inc index 49723962d..0e55c8e6f 100644 --- a/plugins/admin/systems/class_dhcpSubnet.inc +++ b/plugins/admin/systems/class_dhcpSubnet.inc @@ -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; } -- 2.30.2