From e7221437f6ff8f317b4e4d629548b9d94748f651 Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 7 Dec 2009 12:38:05 +0000 Subject: [PATCH] Updated arpa check for trailing dot git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14871 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/systems/admin/systems/class_termDNS.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc index 389b9dc12..c38068201 100644 --- a/gosa-plugins/systems/admin/systems/class_termDNS.inc +++ b/gosa-plugins/systems/admin/systems/class_termDNS.inc @@ -236,7 +236,7 @@ class termDNS extends plugin function netmaskIsCoherent($idZone) { - $netmask = DNS::FlipIp(str_replace(".in-addr.arpa","",DNS::getNameFromMix($idZone))); + $netmask = DNS::FlipIp(str_replace(".in-addr.arpa.","",DNS::getNameFromMix($idZone))); if(!strstr($this->ipHostNumber, $netmask)){ return false; }else{ @@ -1112,7 +1112,7 @@ class termDNS extends plugin $attrs = $ldap->fetch(); $tmp = array_flip($this->Zones); $tmp = preg_replace("/^[^\/]*+\//","",$tmp[$this->dnsEntry['zoneName']]); - $tmp = trim(preg_replace("/\.in-addr.arpa$/","",$tmp)); + $tmp = trim(preg_replace("/\.in-addr.arpa\.$/","",$tmp)); $ptr = preg_replace("/^".preg_quote(DNS::FlipIp($tmp), '/')."\./","",$this->ipHostNumber); return($ptr); }else{ -- 2.30.2