From: Mukund Sivaraman Date: Mon, 25 May 2026 19:25:19 +0000 (+0000) Subject: Add newly allocated EDE INFO-CODEs (#1268) X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=e72bddf1bcfc3ff180d26d93b0fba988495095fa;p=thirdparty%2Fdnspython.git Add newly allocated EDE INFO-CODEs (#1268) These are from the "Extended DNS Error Codes" registry in the "Domain Name System (DNS) Parameters" registry group. --- 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 @@ www.dnspython.org. 300 IN A 1.2.3.4 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)