add AAAA handler

This commit is contained in:
otthorn 2021-04-05 00:44:51 +02:00
parent 9ef300dca4
commit bccee391c2

20
main.py
View file

@ -175,11 +175,29 @@ def a_records_handler(zone, records):
"""Handler for A Record"""
for record in zone["a_records"]:
ipv4_addr = record["ipv4"]
records[record["hostname"]].append(
dns.rdtypes.ANY.A.A(
dns.rdataclass.IN,
dns.rdatatype.A,
record["ipv4"],
ipv4_addr,
)
)
def aaaa_records_handler(zone, records):
"""Handler for AAAA Record"""
for record in zone["aaaa_records"]:
ipv6_addr = record["ipv6"]
records[record["hostname"]].append(
dns.rdtypes.ANY.AAAA.AAAA(
dns.rdataclass.IN,
dns.rdatatype.AAAA,
ipv6_addr,
)
)