Commit 5e449656 authored by Côme Chilliet's avatar Côme Chilliet

Fixes #1296 Using is_ipv4 where it makes sense

parent 149b06c9
......@@ -154,11 +154,11 @@ class dhcpSubnet extends dhcpPlugin
}
/* IP's? */
foreach(array(
foreach (array(
'dhcpNetMask' => _("Netmask"),
'cn' => _("Network address"),
'range_start' => _("Range"),
'range_stop' => _("Range")) as $attr => $str){
'range_stop' => _("Range")) as $attr => $str) {
if ($this->$attr != "" && !tests::is_ip($this->$attr)){
$message[]= msgPool::invalid($str,"","","192.168.0.23");
}
......
......@@ -505,7 +505,7 @@ class servDNSeditZoneEntries extends plugin
if (!tests::is_dns_name($name)) {
$message[] = sprintf($template, $name, $type, $value, _("Entry should be a DNS name."), "example");
}
if (!tests::is_ip($value)) {
if (!tests::is_ipv4($value)) {
$message[] = sprintf($template, $name, $type, $value, _("Value should be an IPv4 address."), "192.168.1.10");
}
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment