Code

Updated arpa check for trailing dot
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 7 Dec 2009 12:38:05 +0000 (12:38 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 7 Dec 2009 12:38:05 +0000 (12:38 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14871 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_termDNS.inc

index 389b9dc12439382de8e070662bb5b0b2fb4c8019..c3806820105ab012dc51e1928edf2d20c0de74eb 100644 (file)
@@ -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{