✨ add AAAA handler
This commit is contained in:
parent
9ef300dca4
commit
bccee391c2
1 changed files with 19 additions and 1 deletions
20
main.py
20
main.py
|
@ -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,
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue