Code

Updated system stuff
[gosa.git] / gosa-plugins / systems / admin / systems / class_termDNS.inc
index 60e2cb626fed1c88f5b2c4c7e0c13cf666125cb1..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{
@@ -393,7 +393,7 @@ class termDNS extends plugin
       if(isset($_POST['propose_ip']) && $this->acl_is_writeable("ipHostNumber")){
         foreach($this->Zones as $key => $name){
           if($name == $this->dnsEntry['zoneName']){
-            $net = DNS::FlipIp(str_replace(".in-addr.arpa","",DNS::getNameFromMix($key)));
+            $net = DNS::FlipIp(str_replace(".in-addr.arpa.","",DNS::getNameFromMix($key)));
             $this->ipHostNumber = $this->generateRandomIP($net);
           }
         }
@@ -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{