mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-12-30 15:05:39 +00:00
Fix #631 Ipv6 reverse dns with pretty_ipv6_ptr enabled
This commit is contained in:
parent
3bf6e6e9f1
commit
7f8ae003fc
@ -149,12 +149,12 @@ class Record(object):
|
|||||||
# If it is ipv6 reverse zone and PRETTY_IPV6_PTR is enabled,
|
# If it is ipv6 reverse zone and PRETTY_IPV6_PTR is enabled,
|
||||||
# We convert ipv6 address back to reverse record format
|
# We convert ipv6 address back to reverse record format
|
||||||
# before submitting to PDNS API.
|
# before submitting to PDNS API.
|
||||||
if self.PRETTY_IPV6_PTR and re.search(r'ip6\.arpa', domain_name):
|
if self.PRETTY_IPV6_PTR and re.search(
|
||||||
if record['record_type'] == 'PTR' and ':' in record[
|
r'ip6\.arpa', domain_name
|
||||||
'record_name']:
|
) and record['record_type'] == 'PTR' and ':' in record[
|
||||||
record_name = dns.reversename.from_address(
|
'record_name']:
|
||||||
record['record_name']).to_text()
|
record_name = dns.reversename.from_address(
|
||||||
|
record['record_name']).to_text()
|
||||||
# Else, it is forward zone, then record name should be
|
# Else, it is forward zone, then record name should be
|
||||||
# in format "<name>.<domain>.". If it is root
|
# in format "<name>.<domain>.". If it is root
|
||||||
# domain name (name == '@' or ''), the name should
|
# domain name (name == '@' or ''), the name should
|
||||||
|
Loading…
Reference in New Issue
Block a user