From 8077b7ab938f436582b3985c1b6fd0ad90e8bb3d Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Mon, 30 May 2011 14:47:31 +0200 Subject: 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 --- install/tools/ipa-replica-prepare | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'install/tools/ipa-replica-prepare') 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) -- cgit