summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 889cb31)
raw | patch | inline | side by side (parent: 889cb31)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 7 Dec 2009 09:57:51 +0000 (09:57 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 7 Dec 2009 09:57:51 +0000 (09:57 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14869 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc | patch | blob | history |
diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc b/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc
index 1e7c288e48b82bfc6dadc29e8a00ad7a794e4b34..99677700002c4edebec5fca7318c89edabdb7b71 100644 (file)
/* This fucntion is used to flip the ip address, for example
12.3.45 -> 45.3.12
- Because some entries (like zones) are store like that 45.3.12.in-addr.arpa
+ Because some entries (like zones) are store like that 45.3.12.in-addr.arpa.
but we want to display 12.3.45.
*/
static function FlipIp($ip)
unset($Zones[$zoneName]);
}else{
$tmp = $ldap->fetch();
- $Zones[$zoneName]['ReverseZone'] = DNS::FlipIp(str_replace(".in-addr.arpa","",$tmp['zoneName'][0]));
- $Zones[$zoneName]['InitialReverseZone'] = DNS::FlipIp(str_replace(".in-addr.arpa","",$tmp['zoneName'][0]));
+ $Zones[$zoneName]['ReverseZone'] = DNS::FlipIp(str_replace(".in-addr.arpa.","",$tmp['zoneName'][0]));
+ $Zones[$zoneName]['InitialReverseZone'] = DNS::FlipIp(str_replace(".in-addr.arpa.","",$tmp['zoneName'][0]));
}
}
return($Zones);
if(!empty($zone['InitialReverseZone'])){
if($zone['InitialReverseZone'] != $zone['ReverseZone']){
$base = "zoneName=".$zone['zoneName'].",".$HostDn;
- $oldRDn = "zoneName=". DNS::FlipIp($zone['InitialReverseZone']).".in-addr.arpa,".$base;
- $newRDn = "zoneName=". DNS::FlipIp($zone['ReverseZone']).".in-addr.arpa,".$base;
- $PrePareZoneEntries[DNS::FlipIp($zone['InitialReverseZone']).".in-addr.arpa"] = DNS::FlipIp($zone['ReverseZone']).".in-addr.arpa";
+ $oldRDn = "zoneName=". DNS::FlipIp($zone['InitialReverseZone']).".in-addr.arpa.,".$base;
+ $newRDn = "zoneName=". DNS::FlipIp($zone['ReverseZone']).".in-addr.arpa.,".$base;
+ $PrePareZoneEntries[DNS::FlipIp($zone['InitialReverseZone']).".in-addr.arpa."] = DNS::FlipIp($zone['ReverseZone']).".in-addr.arpa.";
$move [$oldRDn] = $newRDn;
}
}
/* Create Reverse Entry
* And append it to our add queue
*/
- $zone['ReverseZone'] = DNS::FlipIp($zone['ReverseZone']).".in-addr.arpa";
+ $zone['ReverseZone'] = DNS::FlipIp($zone['ReverseZone']).".in-addr.arpa.";
$base = "zoneName=".$zone['zoneName'].",".$HostDn;
$newRDn = "zoneName=".$zone['ReverseZone'].",".$base;
$rObj = $obj;
$config->current['BASE'],array("zoneName"),GL_NO_ACL_CHECK | GL_SUBSEARCH);
foreach($tmp as $at){
- if(preg_match("/\.in\-addr\.arpa/",$at['zoneName'][0])){
+ if(preg_match("/\.in\-addr\.arpa\./",$at['zoneName'][0])){
$ReverseZones[$at['dn']] = $at;
}else{
$ForwardZones[$at['dn']] = $at;