X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-plugins%2Fsystems%2Fadmin%2Fsystems%2Fclass_termDNS.inc;h=c3806820105ab012dc51e1928edf2d20c0de74eb;hb=e9d5e9913de62425bb7dfd4d993fbcd8ac609aa4;hp=60e2cb626fed1c88f5b2c4c7e0c13cf666125cb1;hpb=3fdad4379cddc96fc012c29a7c496b319ea72d50;p=gosa.git diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc index 60e2cb626..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{ @@ -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{