From 1ebdbcd3ebcf8cde1f03c01943cd4ddae4735a2f Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Tue, 28 Apr 2026 12:13:33 +0800 Subject: [PATCH] Add newly allocated EDE INFO-CODEs These are from the "Extended DNS Error Codes" registry in the "Domain Name System (DNS) Parameters" registry group. --- dns/edns.py | 8 ++++++++ tests/test_message.py | 1 + 2 files changed, 9 insertions(+) diff --git a/dns/edns.py b/dns/edns.py index 5366937c..f9e9e13f 100644 --- a/dns/edns.py +++ b/dns/edns.py @@ -357,6 +357,14 @@ class EDECode(dns.enum.IntEnum): NO_REACHABLE_AUTHORITY = 22 NETWORK_ERROR = 23 INVALID_DATA = 24 + SIGNATURE_EXPIRED_BEFORE_VALID = 25 + TOO_EARLY = 26 + UNSUPPORTED_NSEC3_ITERATIONS_VALUE = 27 + UNABLE_TO_CONFORM_TO_POLICY = 28 + SYNTHESIZED = 29 + INVALID_QUERY_TYPE = 30 + RATE_LIMITED = 31 + OVER_QUOTA = 32 @classmethod def _maximum(cls): diff --git a/tests/test_message.py b/tests/test_message.py index 0eee2a2e..61c7dfa9 100644 --- a/tests/test_message.py +++ b/tests/test_message.py @@ -1012,6 +1012,7 @@ def test_section_count_update(self): def test_extended_errors(self): options = [ dns.edns.EDEOption(dns.edns.EDECode.NETWORK_ERROR, "tubes not tubing"), + dns.edns.EDEOption(dns.edns.EDECode.RATE_LIMITED, "don't ddos me"), dns.edns.EDEOption(dns.edns.EDECode.OTHER, "catch all code"), ] r = dns.message.make_query("example", "A", use_edns=0, options=options)