mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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
This commit is contained in:
parent
31bf405fe3
commit
8077b7ab93
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user