summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-05-30 14:47:31 +0200
committerMartin Kosek <mkosek@redhat.com>2011-06-08 09:14:06 +0200
commit8077b7ab938f436582b3985c1b6fd0ad90e8bb3d (patch)
tree0ad8fbae5f31ee0781872e1835c99a5a82a4b0e4
parent31bf405fe3a1e1d84380bd9c787e7f69b31927ce (diff)
downloadfreeipa-8077b7ab938f436582b3985c1b6fd0ad90e8bb3d.tar.gz
freeipa-8077b7ab938f436582b3985c1b6fd0ad90e8bb3d.tar.xz
freeipa-8077b7ab938f436582b3985c1b6fd0ad90e8bb3d.zip
Fix forward zone creation in ipa-replica-prepare
When a new forward zone is created in ipa-replica-prepare the master DNS address gets corrupted by invalid A/AAAA record. https://fedorahosted.org/freeipa/ticket/1260
-rwxr-xr-xinstall/tools/ipa-replica-prepare5
1 files changed, 3 insertions, 2 deletions
diff --git a/install/tools/ipa-replica-prepare b/install/tools/ipa-replica-prepare
index 2765e4a0e..df44934de 100755
--- a/install/tools/ipa-replica-prepare
+++ b/install/tools/ipa-replica-prepare
@@ -430,6 +430,8 @@ def main():
ip_address = str(ip)
ip_prefixlen = ip.prefixlen
+ ns_ip_address = resolve_host(api.env.host)
+
if ip.defaultnet:
revzone = ip.reverse_dns
if ip.version == 4:
@@ -448,10 +450,9 @@ def main():
if prefix > 0:
ip_prefixlen = prefix
else:
- ns_ip_address = resolve_host(api.env.host)
add_reverse_zone(ip_address, ip_prefixlen, ns_ip_address)
- zone = add_zone(domain, nsaddr=ip_address)
+ zone = add_zone(domain, nsaddr=ns_ip_address)
add_fwd_rr(zone, name, ip_address)
add_ptr_rr(ip_address, ip_prefixlen, replica_fqdn)