Only copy over A/AAAA records to aggregator
This commit is contained in:
parent
411dc22384
commit
42f380e339
|
@ -293,7 +293,7 @@ class AXFRDaemonInstance(object):
|
||||||
axfr = dns.query.xfr(dnsmasq_ip, domain, lifetime=5.0)
|
axfr = dns.query.xfr(dnsmasq_ip, domain, lifetime=5.0)
|
||||||
z = dns.zone.from_xfr(axfr)
|
z = dns.zone.from_xfr(axfr)
|
||||||
records_raw = [z[n].to_text(n) for n in z.nodes.keys()]
|
records_raw = [z[n].to_text(n) for n in z.nodes.keys()]
|
||||||
except OSError as e:
|
except Exception as e:
|
||||||
print('{} {} ({})'.format(e, dnsmasq_ip, domain))
|
print('{} {} ({})'.format(e, dnsmasq_ip, domain))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -334,8 +334,8 @@ class AXFRDaemonInstance(object):
|
||||||
records_old = list()
|
records_old = list()
|
||||||
records_old_ids = list()
|
records_old_ids = list()
|
||||||
for record in results:
|
for record in results:
|
||||||
# Skip the SOA and NS records
|
# Skip the non-A
|
||||||
if record[3] == 'SOA' or record[3] == 'NS':
|
if record[3] != 'A' or record[3] != 'AAAA':
|
||||||
continue
|
continue
|
||||||
# Assemble a list element in the same format as the AXFR data
|
# Assemble a list element in the same format as the AXFR data
|
||||||
entry = '{} {} IN {} {}'.format(record[2], record[5], record[3], record[4])
|
entry = '{} {} IN {} {}'.format(record[2], record[5], record[3], record[4])
|
||||||
|
|
Loading…
Reference in New Issue