1
0
Fork 0
mirror of https://github.com/Luzifer/dns.git synced 2024-12-22 19:01:20 +00:00

Warn for possible broken CNAMEs

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-02-07 09:09:58 +01:00
parent 96374c6697
commit 205495d2d4
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -66,6 +66,11 @@ def check_entry(zone_name, entry):
warn('Zone "{}" - Entry "{}" - Resolved to 0 resource records!'.format(
zone_name, entry['name']))
for entry in parsed_entries:
if entry['type'] == 'CNAME' and entry['data'][-1] != '.':
warn('Zone "{}" - Entry "{}" - CNAME data has no ending dot, pointing to same domain.'.format(
zone_name, entry['name']))
# TODO(kahlers): Add more checks:
# - Type is valid
# - Class is valid