dnscontrol/pkg
Costas Drogos c8a5060dfb
Emit warning in case of label having multiple TTLs (#1489)
* Emit warning in case of label having multiple TTLs

An RRSet (=label) consisting of multiple records with different TTLs is
something not supported by most providers, and should be avoided.
Furthermore it is deprecated in rfc2181#section-5.2

Emit a warning for now during validation, eventually turning it into a full-blown error.

Fixes #1372

* normalize: less verbose checkLabelHasMultipleTTLs

Code would previously emit a warning for each record it found matching a
previously found label but with a different ttl. This could potentially become
too verbose of an output for larger zones.

Split the loop into two loops, one storing labels and their records' TTLs, the
second checking for multiple TTLs, in order to minimize the messages logged to
one message per problematic label, regardless for the number of records involved.

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-05-04 08:41:16 -04:00
..
acme MAINT: Make staticcheck more strict and fix new warnings (#1408) 2022-02-11 14:30:45 -05:00
credsfile Refactor: Rename providers/config to pkg/credsfile (#1494) 2022-05-02 20:12:30 -04:00
diff MAINT: "DUPLICATE E_RECORD" no longer a hard error (#1465) 2022-03-25 12:09:24 -04:00
js TESTING: pkg/js/parse_tests: fix a broken test (#1498) 2022-05-03 19:46:48 -04:00
nameservers Update github.com/StackExchange/dnscontrol/v2 2020-04-14 16:49:03 -04:00
natsort
normalize Emit warning in case of label having multiple TTLs (#1489) 2022-05-04 08:41:16 -04:00
notifications MSTeams Notifier: Fix init bug in teamsNotifier (#845) 2020-09-04 11:50:58 -04:00
prettyzone MAINTENANCE: Return error instead of panic when converting RR to RC (#1199) 2021-07-06 11:03:29 -04:00
printer NEW PROVIDER: AkamaiEdgeDNS (#1174) 2021-06-22 10:24:49 -04:00
recordaudit Security: Fix many staticcheck warnings 2021-12-14 09:47:32 -05:00
spflib Fix broken test 2021-03-01 20:48:29 -05:00
transform Release v3.10.1 (#1194) 2021-07-01 10:17:43 -04:00
txtutil Re-engineer TXT records for simplicity and better compliance (#1063) 2021-03-07 13:19:22 -05:00
version MAINT: Sort various lists (#1433) 2022-03-02 11:19:15 -05:00